{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 分工\n",
    "- 成员：高毓彤   马悦同\n",
    "- 马悦同负责计算收益率，描述性统计，预测变量\n",
    "- 高毓彤负责查找整理数据，预测回归，结果整理"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 预测中国股票市场收益率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 707,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np # 数据处理最重要的模块\n",
    "import pandas as pd # 数据处理最重要的模块\n",
    "import scipy.stats as stats # 统计模块\n",
    "import scipy\n",
    "# import pymysql  # 导入数据库模块\n",
    "\n",
    "from datetime import datetime # 时间模块\n",
    "import statsmodels.formula.api as smf  # OLS regression\n",
    "\n",
    "# import pyreadr # read RDS file\n",
    "\n",
    "from matplotlib import style\n",
    "import matplotlib.pyplot as plt  # 画图模块\n",
    "import matplotlib.dates as mdates\n",
    "\n",
    "\n",
    "from matplotlib.font_manager import FontProperties # 作图中文\n",
    "from pylab import mpl\n",
    "#mpl.rcParams['font.sans-serif'] = ['SimHei']\n",
    "#plt.rcParams['font.family'] = 'Times New Roman'\n",
    "\n",
    "\n",
    "#输出矢量图 渲染矢量图\n",
    "%matplotlib inline\n",
    "%config InlineBackend.figure_format = 'svg'\n",
    "\n",
    "from IPython.core.interactiveshell import InteractiveShell # jupyter运行输出的模块\n",
    "#显示每一个运行结果\n",
    "InteractiveShell.ast_node_interactivity = 'all'\n",
    "\n",
    "#设置行不限制数量\n",
    "#pd.set_option('display.max_rows',None)\n",
    "\n",
    "#设置列不限制数量\n",
    "pd.set_option('display.max_columns', None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 708,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>Highest</th>\n",
       "      <th>Lowest</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>money</th>\n",
       "      <th>Preclose</th>\n",
       "      <th>Return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-26</th>\n",
       "      <td>7803.78</td>\n",
       "      <td>7819.02</td>\n",
       "      <td>7744.88</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>3575.59</td>\n",
       "      <td>367.85</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-27</th>\n",
       "      <td>7762.64</td>\n",
       "      <td>7777.02</td>\n",
       "      <td>7713.12</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>2184.40</td>\n",
       "      <td>261.01</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>-0.008725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-28</th>\n",
       "      <td>7740.17</td>\n",
       "      <td>7748.23</td>\n",
       "      <td>7681.43</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>1724.93</td>\n",
       "      <td>207.40</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>-0.003871</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-29</th>\n",
       "      <td>7703.89</td>\n",
       "      <td>7728.83</td>\n",
       "      <td>7618.24</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>2048.50</td>\n",
       "      <td>252.47</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>-0.003626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>7703.00</td>\n",
       "      <td>7731.77</td>\n",
       "      <td>7684.46</td>\n",
       "      <td>7696.38</td>\n",
       "      <td>1969.28</td>\n",
       "      <td>232.69</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>0.002794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-17</th>\n",
       "      <td>7738.34</td>\n",
       "      <td>7765.41</td>\n",
       "      <td>7603.81</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>6144.71</td>\n",
       "      <td>998.94</td>\n",
       "      <td>7742.17</td>\n",
       "      <td>0.002631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-18</th>\n",
       "      <td>7739.32</td>\n",
       "      <td>7790.46</td>\n",
       "      <td>7715.31</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>4605.38</td>\n",
       "      <td>799.38</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>0.000805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-19</th>\n",
       "      <td>7745.59</td>\n",
       "      <td>7761.12</td>\n",
       "      <td>7701.05</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>4577.73</td>\n",
       "      <td>807.83</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>-0.003151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-20</th>\n",
       "      <td>7729.24</td>\n",
       "      <td>7752.50</td>\n",
       "      <td>7506.26</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>5521.65</td>\n",
       "      <td>940.34</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>-0.030717</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-21</th>\n",
       "      <td>7515.05</td>\n",
       "      <td>7566.69</td>\n",
       "      <td>7421.24</td>\n",
       "      <td>7489.21</td>\n",
       "      <td>4695.98</td>\n",
       "      <td>809.44</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>-0.002294</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1212 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               Open  Highest   Lowest    Close   Volume   money  Preclose  \\\n",
       "Day                                                                         \n",
       "2019-11-26  7803.78  7819.02  7744.88  7800.86  3575.59  367.85       NaN   \n",
       "2019-11-27  7762.64  7777.02  7713.12  7732.80  2184.40  261.01   7800.86   \n",
       "2019-11-28  7740.17  7748.23  7681.43  7702.87  1724.93  207.40   7732.80   \n",
       "2019-11-29  7703.89  7728.83  7618.24  7674.94  2048.50  252.47   7702.87   \n",
       "2019-11-30  7703.00  7731.77  7684.46  7696.38  1969.28  232.69   7674.94   \n",
       "...             ...      ...      ...      ...      ...     ...       ...   \n",
       "2023-03-17  7738.34  7765.41  7603.81  7762.54  6144.71  998.94   7742.17   \n",
       "2023-03-18  7739.32  7790.46  7715.31  7768.79  4605.38  799.38   7762.54   \n",
       "2023-03-19  7745.59  7761.12  7701.05  7744.31  4577.73  807.83   7768.79   \n",
       "2023-03-20  7729.24  7752.50  7506.26  7506.43  5521.65  940.34   7744.31   \n",
       "2023-03-21  7515.05  7566.69  7421.24  7489.21  4695.98  809.44   7506.43   \n",
       "\n",
       "              Return  \n",
       "Day                   \n",
       "2019-11-26       NaN  \n",
       "2019-11-27 -0.008725  \n",
       "2019-11-28 -0.003871  \n",
       "2019-11-29 -0.003626  \n",
       "2019-11-30  0.002794  \n",
       "...              ...  \n",
       "2023-03-17  0.002631  \n",
       "2023-03-18  0.000805  \n",
       "2023-03-19 -0.003151  \n",
       "2023-03-20 -0.030717  \n",
       "2023-03-21 -0.002294  \n",
       "\n",
       "[1212 rows x 8 columns]"
      ]
     },
     "execution_count": 708,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_csv('datasets/szzs.csv')\n",
    "data['Day']=pd.to_datetime(data['Day'],format='%Y/%m/%d')\n",
    "data.set_index('Day',inplace=True)\n",
    "data['Close']=pd.to_numeric(data['Close'],errors='coerce')\n",
    "data['Preclose']=(data['Close']).shift(1)\n",
    "data['Return']=(data['Close']-data['Preclose'])/data['Preclose']\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 计算收益率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 709,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>Highest</th>\n",
       "      <th>Lowest</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>money</th>\n",
       "      <th>Preclose</th>\n",
       "      <th>Return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-26</th>\n",
       "      <td>7803.78</td>\n",
       "      <td>7819.02</td>\n",
       "      <td>7744.88</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>3575.59</td>\n",
       "      <td>367.85</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-27</th>\n",
       "      <td>7762.64</td>\n",
       "      <td>7777.02</td>\n",
       "      <td>7713.12</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>2184.40</td>\n",
       "      <td>261.01</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>-0.008725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-28</th>\n",
       "      <td>7740.17</td>\n",
       "      <td>7748.23</td>\n",
       "      <td>7681.43</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>1724.93</td>\n",
       "      <td>207.40</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>-0.003871</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-29</th>\n",
       "      <td>7703.89</td>\n",
       "      <td>7728.83</td>\n",
       "      <td>7618.24</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>2048.50</td>\n",
       "      <td>252.47</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>-0.003626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>7703.00</td>\n",
       "      <td>7731.77</td>\n",
       "      <td>7684.46</td>\n",
       "      <td>7696.38</td>\n",
       "      <td>1969.28</td>\n",
       "      <td>232.69</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>0.002794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-17</th>\n",
       "      <td>7738.34</td>\n",
       "      <td>7765.41</td>\n",
       "      <td>7603.81</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>6144.71</td>\n",
       "      <td>998.94</td>\n",
       "      <td>7742.17</td>\n",
       "      <td>0.002631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-18</th>\n",
       "      <td>7739.32</td>\n",
       "      <td>7790.46</td>\n",
       "      <td>7715.31</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>4605.38</td>\n",
       "      <td>799.38</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>0.000805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-19</th>\n",
       "      <td>7745.59</td>\n",
       "      <td>7761.12</td>\n",
       "      <td>7701.05</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>4577.73</td>\n",
       "      <td>807.83</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>-0.003151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-20</th>\n",
       "      <td>7729.24</td>\n",
       "      <td>7752.50</td>\n",
       "      <td>7506.26</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>5521.65</td>\n",
       "      <td>940.34</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>-0.030717</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-21</th>\n",
       "      <td>7515.05</td>\n",
       "      <td>7566.69</td>\n",
       "      <td>7421.24</td>\n",
       "      <td>7489.21</td>\n",
       "      <td>4695.98</td>\n",
       "      <td>809.44</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>-0.002294</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1212 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               Open  Highest   Lowest    Close   Volume   money  Preclose  \\\n",
       "Day                                                                         \n",
       "2019-11-26  7803.78  7819.02  7744.88  7800.86  3575.59  367.85       NaN   \n",
       "2019-11-27  7762.64  7777.02  7713.12  7732.80  2184.40  261.01   7800.86   \n",
       "2019-11-28  7740.17  7748.23  7681.43  7702.87  1724.93  207.40   7732.80   \n",
       "2019-11-29  7703.89  7728.83  7618.24  7674.94  2048.50  252.47   7702.87   \n",
       "2019-11-30  7703.00  7731.77  7684.46  7696.38  1969.28  232.69   7674.94   \n",
       "...             ...      ...      ...      ...      ...     ...       ...   \n",
       "2023-03-17  7738.34  7765.41  7603.81  7762.54  6144.71  998.94   7742.17   \n",
       "2023-03-18  7739.32  7790.46  7715.31  7768.79  4605.38  799.38   7762.54   \n",
       "2023-03-19  7745.59  7761.12  7701.05  7744.31  4577.73  807.83   7768.79   \n",
       "2023-03-20  7729.24  7752.50  7506.26  7506.43  5521.65  940.34   7744.31   \n",
       "2023-03-21  7515.05  7566.69  7421.24  7489.21  4695.98  809.44   7506.43   \n",
       "\n",
       "              Return  \n",
       "Day                   \n",
       "2019-11-26       NaN  \n",
       "2019-11-27 -0.008725  \n",
       "2019-11-28 -0.003871  \n",
       "2019-11-29 -0.003626  \n",
       "2019-11-30  0.002794  \n",
       "...              ...  \n",
       "2023-03-17  0.002631  \n",
       "2023-03-18  0.000805  \n",
       "2023-03-19 -0.003151  \n",
       "2023-03-20 -0.030717  \n",
       "2023-03-21 -0.002294  \n",
       "\n",
       "[1212 rows x 8 columns]"
      ]
     },
     "execution_count": 709,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_new = data['2019-11':'2023-03'].copy()\n",
    "data_new['Close'] = pd.to_numeric(data_new['Close'])\n",
    "data_new['Preclose'] = pd.to_numeric(data_new['Preclose'])\n",
    "data_new\n",
    "#提取2019-2023时间段的数据，并将列转换为数值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 710,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>Highest</th>\n",
       "      <th>Lowest</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>money</th>\n",
       "      <th>Preclose</th>\n",
       "      <th>Return</th>\n",
       "      <th>Raw_return</th>\n",
       "      <th>Log_return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-26</th>\n",
       "      <td>7803.78</td>\n",
       "      <td>7819.02</td>\n",
       "      <td>7744.88</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>3575.59</td>\n",
       "      <td>367.85</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-27</th>\n",
       "      <td>7762.64</td>\n",
       "      <td>7777.02</td>\n",
       "      <td>7713.12</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>2184.40</td>\n",
       "      <td>261.01</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>-0.008725</td>\n",
       "      <td>-0.008725</td>\n",
       "      <td>-0.008763</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-28</th>\n",
       "      <td>7740.17</td>\n",
       "      <td>7748.23</td>\n",
       "      <td>7681.43</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>1724.93</td>\n",
       "      <td>207.40</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>-0.003871</td>\n",
       "      <td>-0.003871</td>\n",
       "      <td>-0.003878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-29</th>\n",
       "      <td>7703.89</td>\n",
       "      <td>7728.83</td>\n",
       "      <td>7618.24</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>2048.50</td>\n",
       "      <td>252.47</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>-0.003626</td>\n",
       "      <td>-0.003626</td>\n",
       "      <td>-0.003633</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>7703.00</td>\n",
       "      <td>7731.77</td>\n",
       "      <td>7684.46</td>\n",
       "      <td>7696.38</td>\n",
       "      <td>1969.28</td>\n",
       "      <td>232.69</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>0.002794</td>\n",
       "      <td>0.002794</td>\n",
       "      <td>0.002790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-17</th>\n",
       "      <td>7738.34</td>\n",
       "      <td>7765.41</td>\n",
       "      <td>7603.81</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>6144.71</td>\n",
       "      <td>998.94</td>\n",
       "      <td>7742.17</td>\n",
       "      <td>0.002631</td>\n",
       "      <td>0.002631</td>\n",
       "      <td>0.002628</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-18</th>\n",
       "      <td>7739.32</td>\n",
       "      <td>7790.46</td>\n",
       "      <td>7715.31</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>4605.38</td>\n",
       "      <td>799.38</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>0.000805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-19</th>\n",
       "      <td>7745.59</td>\n",
       "      <td>7761.12</td>\n",
       "      <td>7701.05</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>4577.73</td>\n",
       "      <td>807.83</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>-0.003151</td>\n",
       "      <td>-0.003151</td>\n",
       "      <td>-0.003156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-20</th>\n",
       "      <td>7729.24</td>\n",
       "      <td>7752.50</td>\n",
       "      <td>7506.26</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>5521.65</td>\n",
       "      <td>940.34</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>-0.030717</td>\n",
       "      <td>-0.030717</td>\n",
       "      <td>-0.031198</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-21</th>\n",
       "      <td>7515.05</td>\n",
       "      <td>7566.69</td>\n",
       "      <td>7421.24</td>\n",
       "      <td>7489.21</td>\n",
       "      <td>4695.98</td>\n",
       "      <td>809.44</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>-0.002294</td>\n",
       "      <td>-0.002294</td>\n",
       "      <td>-0.002297</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1212 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               Open  Highest   Lowest    Close   Volume   money  Preclose  \\\n",
       "Day                                                                         \n",
       "2019-11-26  7803.78  7819.02  7744.88  7800.86  3575.59  367.85       NaN   \n",
       "2019-11-27  7762.64  7777.02  7713.12  7732.80  2184.40  261.01   7800.86   \n",
       "2019-11-28  7740.17  7748.23  7681.43  7702.87  1724.93  207.40   7732.80   \n",
       "2019-11-29  7703.89  7728.83  7618.24  7674.94  2048.50  252.47   7702.87   \n",
       "2019-11-30  7703.00  7731.77  7684.46  7696.38  1969.28  232.69   7674.94   \n",
       "...             ...      ...      ...      ...      ...     ...       ...   \n",
       "2023-03-17  7738.34  7765.41  7603.81  7762.54  6144.71  998.94   7742.17   \n",
       "2023-03-18  7739.32  7790.46  7715.31  7768.79  4605.38  799.38   7762.54   \n",
       "2023-03-19  7745.59  7761.12  7701.05  7744.31  4577.73  807.83   7768.79   \n",
       "2023-03-20  7729.24  7752.50  7506.26  7506.43  5521.65  940.34   7744.31   \n",
       "2023-03-21  7515.05  7566.69  7421.24  7489.21  4695.98  809.44   7506.43   \n",
       "\n",
       "              Return  Raw_return  Log_return  \n",
       "Day                                           \n",
       "2019-11-26       NaN         NaN         NaN  \n",
       "2019-11-27 -0.008725   -0.008725   -0.008763  \n",
       "2019-11-28 -0.003871   -0.003871   -0.003878  \n",
       "2019-11-29 -0.003626   -0.003626   -0.003633  \n",
       "2019-11-30  0.002794    0.002794    0.002790  \n",
       "...              ...         ...         ...  \n",
       "2023-03-17  0.002631    0.002631    0.002628  \n",
       "2023-03-18  0.000805    0.000805    0.000805  \n",
       "2023-03-19 -0.003151   -0.003151   -0.003156  \n",
       "2023-03-20 -0.030717   -0.030717   -0.031198  \n",
       "2023-03-21 -0.002294   -0.002294   -0.002297  \n",
       "\n",
       "[1212 rows x 10 columns]"
      ]
     },
     "execution_count": 710,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_new['Raw_return'] = data_new['Close'] / data_new['Preclose'] - 1\n",
    "data_new['Log_return'] = np.log(data_new['Close']) - np.log(data_new['Preclose'])\n",
    "data_new# 计算简单收益率和对数收益率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 711,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Log_return</th>\n",
       "      <th>Raw_Return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>-0.013484</td>\n",
       "      <td>-0.013393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.113913</td>\n",
       "      <td>0.120654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006817</td>\n",
       "      <td>-0.006794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.124740</td>\n",
       "      <td>-0.117274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.053372</td>\n",
       "      <td>0.054822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.151757</td>\n",
       "      <td>0.163878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014349</td>\n",
       "      <td>0.014453</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012434</td>\n",
       "      <td>0.012512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.100085</td>\n",
       "      <td>0.105265</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.062990</td>\n",
       "      <td>0.065016</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.058402</td>\n",
       "      <td>-0.056729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005542</td>\n",
       "      <td>0.005557</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001703</td>\n",
       "      <td>-0.001702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.058692</td>\n",
       "      <td>-0.057003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024606</td>\n",
       "      <td>-0.024306</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008447</td>\n",
       "      <td>-0.008411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037879</td>\n",
       "      <td>-0.037170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022646</td>\n",
       "      <td>0.022904</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.114700</td>\n",
       "      <td>-0.108366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035637</td>\n",
       "      <td>-0.035009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029448</td>\n",
       "      <td>-0.029019</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009198</td>\n",
       "      <td>0.009241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.037639</td>\n",
       "      <td>-0.036939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.116444</td>\n",
       "      <td>-0.109920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.127325</td>\n",
       "      <td>0.135786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.031911</td>\n",
       "      <td>0.032426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039901</td>\n",
       "      <td>-0.039116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.029999</td>\n",
       "      <td>0.030454</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.098561</td>\n",
       "      <td>-0.093860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.042824</td>\n",
       "      <td>0.043754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026427</td>\n",
       "      <td>0.026779</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.117664</td>\n",
       "      <td>-0.111005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013451</td>\n",
       "      <td>-0.013361</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.042015</td>\n",
       "      <td>-0.041145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.092219</td>\n",
       "      <td>0.096605</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017581</td>\n",
       "      <td>-0.017427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006054</td>\n",
       "      <td>0.006073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.083612</td>\n",
       "      <td>-0.080212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030596</td>\n",
       "      <td>-0.030133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.209920</td>\n",
       "      <td>0.233580</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>-0.041718</td>\n",
       "      <td>-0.040859</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Log_return  Raw_Return\n",
       "Day                               \n",
       "2019-11-30   -0.013484   -0.013393\n",
       "2019-12-31    0.113913    0.120654\n",
       "2020-01-31   -0.006817   -0.006794\n",
       "2020-02-29   -0.124740   -0.117274\n",
       "2020-03-31    0.053372    0.054822\n",
       "2020-04-30    0.151757    0.163878\n",
       "2020-05-31    0.014349    0.014453\n",
       "2020-06-30    0.012434    0.012512\n",
       "2020-07-31    0.100085    0.105265\n",
       "2020-08-31    0.062990    0.065016\n",
       "2020-09-30   -0.058402   -0.056729\n",
       "2020-10-31    0.005542    0.005557\n",
       "2020-11-30   -0.001703   -0.001702\n",
       "2020-12-31   -0.058692   -0.057003\n",
       "2021-01-31   -0.024606   -0.024306\n",
       "2021-02-28   -0.008447   -0.008411\n",
       "2021-03-31   -0.037879   -0.037170\n",
       "2021-04-30    0.022646    0.022904\n",
       "2021-05-31   -0.114700   -0.108366\n",
       "2021-06-30   -0.035637   -0.035009\n",
       "2021-07-31   -0.029448   -0.029019\n",
       "2021-08-31    0.009198    0.009241\n",
       "2021-09-30   -0.037639   -0.036939\n",
       "2021-10-31   -0.116444   -0.109920\n",
       "2021-11-30    0.127325    0.135786\n",
       "2021-12-31    0.031911    0.032426\n",
       "2022-01-31   -0.039901   -0.039116\n",
       "2022-02-28    0.029999    0.030454\n",
       "2022-03-31   -0.098561   -0.093860\n",
       "2022-04-30    0.042824    0.043754\n",
       "2022-05-31    0.026427    0.026779\n",
       "2022-06-30   -0.117664   -0.111005\n",
       "2022-07-31   -0.013451   -0.013361\n",
       "2022-08-31   -0.042015   -0.041145\n",
       "2022-09-30    0.092219    0.096605\n",
       "2022-10-31   -0.017581   -0.017427\n",
       "2022-11-30    0.006054    0.006073\n",
       "2022-12-31   -0.083612   -0.080212\n",
       "2023-01-31   -0.030596   -0.030133\n",
       "2023-02-28    0.209920    0.233580\n",
       "2023-03-31   -0.041718   -0.040859"
      ]
     },
     "execution_count": 711,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Month_data = data_new.resample('ME')['Log_return'].sum().to_frame() \n",
    "Month_data['Raw_Return'] = np.exp(Month_data['Log_return']) - 1\n",
    "Month_data# 按月重新采样并计算每月的对数收益率总和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 712,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>Highest</th>\n",
       "      <th>Lowest</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>money</th>\n",
       "      <th>Preclose</th>\n",
       "      <th>Return</th>\n",
       "      <th>Raw_return</th>\n",
       "      <th>Log_return</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-26</th>\n",
       "      <td>7803.78</td>\n",
       "      <td>7819.02</td>\n",
       "      <td>7744.88</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>3575.59</td>\n",
       "      <td>367.85</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-27</th>\n",
       "      <td>7762.64</td>\n",
       "      <td>7777.02</td>\n",
       "      <td>7713.12</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>2184.40</td>\n",
       "      <td>261.01</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>-0.008725</td>\n",
       "      <td>-0.008725</td>\n",
       "      <td>-0.008763</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-28</th>\n",
       "      <td>7740.17</td>\n",
       "      <td>7748.23</td>\n",
       "      <td>7681.43</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>1724.93</td>\n",
       "      <td>207.40</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>-0.003871</td>\n",
       "      <td>-0.003871</td>\n",
       "      <td>-0.003878</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-29</th>\n",
       "      <td>7703.89</td>\n",
       "      <td>7728.83</td>\n",
       "      <td>7618.24</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>2048.50</td>\n",
       "      <td>252.47</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>-0.003626</td>\n",
       "      <td>-0.003626</td>\n",
       "      <td>-0.003633</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>7703.00</td>\n",
       "      <td>7731.77</td>\n",
       "      <td>7684.46</td>\n",
       "      <td>7696.38</td>\n",
       "      <td>1969.28</td>\n",
       "      <td>232.69</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>0.002794</td>\n",
       "      <td>0.002794</td>\n",
       "      <td>0.002790</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-17</th>\n",
       "      <td>7738.34</td>\n",
       "      <td>7765.41</td>\n",
       "      <td>7603.81</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>6144.71</td>\n",
       "      <td>998.94</td>\n",
       "      <td>7742.17</td>\n",
       "      <td>0.002631</td>\n",
       "      <td>0.002631</td>\n",
       "      <td>0.002628</td>\n",
       "      <td>2023</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-18</th>\n",
       "      <td>7739.32</td>\n",
       "      <td>7790.46</td>\n",
       "      <td>7715.31</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>4605.38</td>\n",
       "      <td>799.38</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>2023</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-19</th>\n",
       "      <td>7745.59</td>\n",
       "      <td>7761.12</td>\n",
       "      <td>7701.05</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>4577.73</td>\n",
       "      <td>807.83</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>-0.003151</td>\n",
       "      <td>-0.003151</td>\n",
       "      <td>-0.003156</td>\n",
       "      <td>2023</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-20</th>\n",
       "      <td>7729.24</td>\n",
       "      <td>7752.50</td>\n",
       "      <td>7506.26</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>5521.65</td>\n",
       "      <td>940.34</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>-0.030717</td>\n",
       "      <td>-0.030717</td>\n",
       "      <td>-0.031198</td>\n",
       "      <td>2023</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-21</th>\n",
       "      <td>7515.05</td>\n",
       "      <td>7566.69</td>\n",
       "      <td>7421.24</td>\n",
       "      <td>7489.21</td>\n",
       "      <td>4695.98</td>\n",
       "      <td>809.44</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>-0.002294</td>\n",
       "      <td>-0.002294</td>\n",
       "      <td>-0.002297</td>\n",
       "      <td>2023</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1212 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               Open  Highest   Lowest    Close   Volume   money  Preclose  \\\n",
       "Day                                                                         \n",
       "2019-11-26  7803.78  7819.02  7744.88  7800.86  3575.59  367.85       NaN   \n",
       "2019-11-27  7762.64  7777.02  7713.12  7732.80  2184.40  261.01   7800.86   \n",
       "2019-11-28  7740.17  7748.23  7681.43  7702.87  1724.93  207.40   7732.80   \n",
       "2019-11-29  7703.89  7728.83  7618.24  7674.94  2048.50  252.47   7702.87   \n",
       "2019-11-30  7703.00  7731.77  7684.46  7696.38  1969.28  232.69   7674.94   \n",
       "...             ...      ...      ...      ...      ...     ...       ...   \n",
       "2023-03-17  7738.34  7765.41  7603.81  7762.54  6144.71  998.94   7742.17   \n",
       "2023-03-18  7739.32  7790.46  7715.31  7768.79  4605.38  799.38   7762.54   \n",
       "2023-03-19  7745.59  7761.12  7701.05  7744.31  4577.73  807.83   7768.79   \n",
       "2023-03-20  7729.24  7752.50  7506.26  7506.43  5521.65  940.34   7744.31   \n",
       "2023-03-21  7515.05  7566.69  7421.24  7489.21  4695.98  809.44   7506.43   \n",
       "\n",
       "              Return  Raw_return  Log_return  year  month  \n",
       "Day                                                        \n",
       "2019-11-26       NaN         NaN         NaN  2019     11  \n",
       "2019-11-27 -0.008725   -0.008725   -0.008763  2019     11  \n",
       "2019-11-28 -0.003871   -0.003871   -0.003878  2019     11  \n",
       "2019-11-29 -0.003626   -0.003626   -0.003633  2019     11  \n",
       "2019-11-30  0.002794    0.002794    0.002790  2019     11  \n",
       "...              ...         ...         ...   ...    ...  \n",
       "2023-03-17  0.002631    0.002631    0.002628  2023      3  \n",
       "2023-03-18  0.000805    0.000805    0.000805  2023      3  \n",
       "2023-03-19 -0.003151   -0.003151   -0.003156  2023      3  \n",
       "2023-03-20 -0.030717   -0.030717   -0.031198  2023      3  \n",
       "2023-03-21 -0.002294   -0.002294   -0.002297  2023      3  \n",
       "\n",
       "[1212 rows x 12 columns]"
      ]
     },
     "execution_count": 712,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_new2 = data_new.copy()\n",
    "data_new2['year'] = data_new2.index.year\n",
    "data_new2['month'] = data_new2.index.month\n",
    "data_new2# 添加年份和月份列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 713,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Log_return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">2019</th>\n",
       "      <th>11</th>\n",
       "      <td>-0.013484</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.113913</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">2020</th>\n",
       "      <th>1</th>\n",
       "      <td>-0.006817</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.124740</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.053372</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.151757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.014349</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.012434</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.100085</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.062990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>-0.058402</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.005542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>-0.001703</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>-0.058692</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">2021</th>\n",
       "      <th>1</th>\n",
       "      <td>-0.024606</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.008447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.037879</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.022646</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-0.114700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-0.035637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>-0.029448</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.009198</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>-0.037639</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>-0.116444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.127325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.031911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">2022</th>\n",
       "      <th>1</th>\n",
       "      <td>-0.039901</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.029999</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.098561</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.042824</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.026427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-0.117664</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>-0.013451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>-0.042015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.092219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>-0.017581</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.006054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>-0.083612</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">2023</th>\n",
       "      <th>1</th>\n",
       "      <td>-0.030596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.209920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.041718</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Log_return\n",
       "year month            \n",
       "2019 11      -0.013484\n",
       "     12       0.113913\n",
       "2020 1       -0.006817\n",
       "     2       -0.124740\n",
       "     3        0.053372\n",
       "     4        0.151757\n",
       "     5        0.014349\n",
       "     6        0.012434\n",
       "     7        0.100085\n",
       "     8        0.062990\n",
       "     9       -0.058402\n",
       "     10       0.005542\n",
       "     11      -0.001703\n",
       "     12      -0.058692\n",
       "2021 1       -0.024606\n",
       "     2       -0.008447\n",
       "     3       -0.037879\n",
       "     4        0.022646\n",
       "     5       -0.114700\n",
       "     6       -0.035637\n",
       "     7       -0.029448\n",
       "     8        0.009198\n",
       "     9       -0.037639\n",
       "     10      -0.116444\n",
       "     11       0.127325\n",
       "     12       0.031911\n",
       "2022 1       -0.039901\n",
       "     2        0.029999\n",
       "     3       -0.098561\n",
       "     4        0.042824\n",
       "     5        0.026427\n",
       "     6       -0.117664\n",
       "     7       -0.013451\n",
       "     8       -0.042015\n",
       "     9        0.092219\n",
       "     10      -0.017581\n",
       "     11       0.006054\n",
       "     12      -0.083612\n",
       "2023 1       -0.030596\n",
       "     2        0.209920\n",
       "     3       -0.041718"
      ]
     },
     "execution_count": 713,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Month_data2 = data_new2.groupby(['year','month'])['Log_return'].sum().to_frame()\n",
    "Month_data2# 按年和月分组并计算每月的对数收益率总和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 714,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>-0.013393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.120654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.117274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014453</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.056729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005557</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.057003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024306</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022904</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.108366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029019</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.036939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.109920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.032426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.030454</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.093860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026779</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.111005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013361</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.041145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.080212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>-0.040859</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Return\n",
       "Day                 \n",
       "2019-11-30 -0.013393\n",
       "2019-12-31  0.120654\n",
       "2020-01-31 -0.006794\n",
       "2020-02-29 -0.117274\n",
       "2020-03-31  0.054822\n",
       "2020-04-30  0.163878\n",
       "2020-05-31  0.014453\n",
       "2020-06-30  0.012512\n",
       "2020-07-31  0.105265\n",
       "2020-08-31  0.065016\n",
       "2020-09-30 -0.056729\n",
       "2020-10-31  0.005557\n",
       "2020-11-30 -0.001702\n",
       "2020-12-31 -0.057003\n",
       "2021-01-31 -0.024306\n",
       "2021-02-28 -0.008411\n",
       "2021-03-31 -0.037170\n",
       "2021-04-30  0.022904\n",
       "2021-05-31 -0.108366\n",
       "2021-06-30 -0.035009\n",
       "2021-07-31 -0.029019\n",
       "2021-08-31  0.009241\n",
       "2021-09-30 -0.036939\n",
       "2021-10-31 -0.109920\n",
       "2021-11-30  0.135786\n",
       "2021-12-31  0.032426\n",
       "2022-01-31 -0.039116\n",
       "2022-02-28  0.030454\n",
       "2022-03-31 -0.093860\n",
       "2022-04-30  0.043754\n",
       "2022-05-31  0.026779\n",
       "2022-06-30 -0.111005\n",
       "2022-07-31 -0.013361\n",
       "2022-08-31 -0.041145\n",
       "2022-09-30  0.096605\n",
       "2022-10-31 -0.017427\n",
       "2022-11-30  0.006073\n",
       "2022-12-31 -0.080212\n",
       "2023-01-31 -0.030133\n",
       "2023-02-28  0.233580\n",
       "2023-03-31 -0.040859"
      ]
     },
     "execution_count": 714,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Month_data = data_new.resample('ME')['Raw_return'].apply(lambda x: (1+x).prod()-1).to_frame()\n",
    "Month_data.columns = ['Return']\n",
    "Month_data#每月的简单收益率总和"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 描述性统计"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 715,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.0017220466552815526"
      ]
     },
     "execution_count": 715,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(Month_data['2019':'2023']['Return'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 分位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 716,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[-0.105465030033468,\n",
       " -0.05049532902968468,\n",
       " -0.03703185501140851,\n",
       " -0.025248716475103582,\n",
       " -0.008410932064211618,\n",
       " 0.006706447529537129,\n",
       " 0.02445426093916363,\n",
       " 0.05039460722448332,\n",
       " 0.11757629643483244]"
      ]
     },
     "execution_count": 716,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from statistics import quantiles\n",
    "quantiles(Month_data['2019':'2023']['Return'],n=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 717,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.120654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Return\n",
       "Day                 \n",
       "2019-12-31  0.120654\n",
       "2020-03-31  0.054822\n",
       "2020-04-30  0.163878\n",
       "2020-07-31  0.105265\n",
       "2020-08-31  0.065016\n",
       "2021-11-30  0.135786\n",
       "2022-04-30  0.043754\n",
       "2022-09-30  0.096605\n",
       "2023-02-28  0.233580"
      ]
     },
     "execution_count": 717,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "high_return_months = Month_data[Month_data['Return'] > 0.04034103241658733]\n",
    "high_return_months"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 方差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 718,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Variance</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.000076</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>0.000599</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>0.000406</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.000100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.000378</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.000181</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.000119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.000109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.000130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>0.000271</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.000179</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>0.000066</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>0.000071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>0.000205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>0.000105</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>0.000121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.000109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>0.000187</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>0.000451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>0.000217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.000134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>0.000096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>0.000148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.000319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.000111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>0.000108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.000065</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>0.000081</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.000062</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.000178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>0.000048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>0.000069</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>0.000071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.000155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>0.000082</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.000087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>0.000080</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>0.000115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.001044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>0.000183</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Variance\n",
       "Day                 \n",
       "2019-11-30  0.000022\n",
       "2019-12-31  0.000076\n",
       "2020-01-31  0.000599\n",
       "2020-02-29  0.000406\n",
       "2020-03-31  0.000100\n",
       "2020-04-30  0.000378\n",
       "2020-05-31  0.000181\n",
       "2020-06-30  0.000119\n",
       "2020-07-31  0.000109\n",
       "2020-08-31  0.000130\n",
       "2020-09-30  0.000271\n",
       "2020-10-31  0.000179\n",
       "2020-11-30  0.000066\n",
       "2020-12-31  0.000071\n",
       "2021-01-31  0.000205\n",
       "2021-02-28  0.000105\n",
       "2021-03-31  0.000121\n",
       "2021-04-30  0.000109\n",
       "2021-05-31  0.000187\n",
       "2021-06-30  0.000451\n",
       "2021-07-31  0.000217\n",
       "2021-08-31  0.000134\n",
       "2021-09-30  0.000096\n",
       "2021-10-31  0.000148\n",
       "2021-11-30  0.000319\n",
       "2021-12-31  0.000111\n",
       "2022-01-31  0.000108\n",
       "2022-02-28  0.000065\n",
       "2022-03-31  0.000081\n",
       "2022-04-30  0.000062\n",
       "2022-05-31  0.000178\n",
       "2022-06-30  0.000048\n",
       "2022-07-31  0.000069\n",
       "2022-08-31  0.000071\n",
       "2022-09-30  0.000155\n",
       "2022-10-31  0.000082\n",
       "2022-11-30  0.000087\n",
       "2022-12-31  0.000080\n",
       "2023-01-31  0.000115\n",
       "2023-02-28  0.001044\n",
       "2023-03-31  0.000183"
      ]
     },
     "execution_count": 718,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "monthly_var = data_new.resample('ME')['Raw_return'].var().to_frame()\n",
    "monthly_var.rename(columns={'Raw_return':'Variance'},inplace=True)\n",
    "monthly_var"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 719,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Variance</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>0.000112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.002712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>0.017973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>0.011840</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.003087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.011776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.005451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.003471</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.003598</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.004050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>0.007947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>0.001902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>0.002222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>0.006156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>0.002826</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>0.003676</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.003170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>0.006009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>0.013094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>0.006530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.004009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>0.002820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>0.004860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.009847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.003367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>0.003293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.001798</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>0.002724</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.001867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.005357</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>0.001843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>0.002083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>0.002173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.004792</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>0.002458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.002519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>0.002608</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>0.003476</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.029983</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>0.003731</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Variance\n",
       "Day                 \n",
       "2019-11-30  0.000112\n",
       "2019-12-31  0.002712\n",
       "2020-01-31  0.017973\n",
       "2020-02-29  0.011840\n",
       "2020-03-31  0.003087\n",
       "2020-04-30  0.011776\n",
       "2020-05-31  0.005451\n",
       "2020-06-30  0.003471\n",
       "2020-07-31  0.003598\n",
       "2020-08-31  0.004050\n",
       "2020-09-30  0.007947\n",
       "2020-10-31  0.005358\n",
       "2020-11-30  0.001902\n",
       "2020-12-31  0.002222\n",
       "2021-01-31  0.006156\n",
       "2021-02-28  0.002826\n",
       "2021-03-31  0.003676\n",
       "2021-04-30  0.003170\n",
       "2021-05-31  0.006009\n",
       "2021-06-30  0.013094\n",
       "2021-07-31  0.006530\n",
       "2021-08-31  0.004009\n",
       "2021-09-30  0.002820\n",
       "2021-10-31  0.004860\n",
       "2021-11-30  0.009847\n",
       "2021-12-31  0.003367\n",
       "2022-01-31  0.003293\n",
       "2022-02-28  0.001798\n",
       "2022-03-31  0.002724\n",
       "2022-04-30  0.001867\n",
       "2022-05-31  0.005357\n",
       "2022-06-30  0.001843\n",
       "2022-07-31  0.002083\n",
       "2022-08-31  0.002173\n",
       "2022-09-30  0.004792\n",
       "2022-10-31  0.002458\n",
       "2022-11-30  0.002519\n",
       "2022-12-31  0.002608\n",
       "2023-01-31  0.003476\n",
       "2023-02-28  0.029983\n",
       "2023-03-31  0.003731"
      ]
     },
     "execution_count": 719,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_new[\"Return_2\"] = data_new[\"Raw_return\"]**2\n",
    "monthly_var = data_new.resample('ME')['Return_2'].sum().to_frame()\n",
    "monthly_var.rename(columns={'Return_2':'Variance'},inplace=True)\n",
    "monthly_var"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 720,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"625.659063pt\" height=\"301.1655pt\" viewBox=\"0 0 625.659063 301.1655\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2024-11-26T17:16:00.799085</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.8.4, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 301.1655 \n",
       "L 625.659063 301.1655 \n",
       "L 625.659063 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 618.459062 245.90175 \n",
       "L 618.459062 24.14175 \n",
       "L 60.459063 24.14175 \n",
       "z\n",
       "\" style=\"fill: #e5e5e5\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 99.161012 245.90175 \n",
       "L 99.161012 24.14175 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"ma6eb8921d2\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#ma6eb8921d2\" x=\"99.161012\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 2020 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(101.920387 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 251.71797 245.90175 \n",
       "L 251.71797 24.14175 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#ma6eb8921d2\" x=\"251.71797\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 2021 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(254.477345 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 403.858106 245.90175 \n",
       "L 403.858106 24.14175 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#ma6eb8921d2\" x=\"403.858106\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 2022 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(406.617481 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 555.998242 245.90175 \n",
       "L 555.998242 24.14175 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#ma6eb8921d2\" x=\"555.998242\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 2023 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(558.757617 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_5\">\n",
       "     <!-- Year -->\n",
       "     <g style=\"fill: #555555\" transform=\"translate(326.754063 291.469875) scale(0.12 -0.12)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-59\" d=\"M -13 4666 \n",
       "L 666 4666 \n",
       "L 1959 2747 \n",
       "L 3244 4666 \n",
       "L 3922 4666 \n",
       "L 2272 2222 \n",
       "L 2272 0 \n",
       "L 1638 0 \n",
       "L 1638 2222 \n",
       "L -13 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
       "Q 2534 3019 2420 3045 \n",
       "Q 2306 3072 2169 3072 \n",
       "Q 1681 3072 1420 2755 \n",
       "Q 1159 2438 1159 1844 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1341 3275 1631 3429 \n",
       "Q 1922 3584 2338 3584 \n",
       "Q 2397 3584 2469 3576 \n",
       "Q 2541 3569 2628 3553 \n",
       "L 2631 2963 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-59\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"47.833984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"109.357422\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"170.636719\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 60.459063 225.896364 \n",
       "L 618.459062 225.896364 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <defs>\n",
       "       <path id=\"m859795a35a\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"225.896364\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- −0.10 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(22.81375 229.695582) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 60.459063 197.166391 \n",
       "L 618.459062 197.166391 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"197.166391\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- −0.05 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(22.81375 200.96561) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 60.459063 168.436418 \n",
       "L 618.459062 168.436418 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"168.436418\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.00 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 172.235637) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 60.459063 139.706445 \n",
       "L 618.459062 139.706445 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"139.706445\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.05 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 143.505664) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 60.459063 110.976473 \n",
       "L 618.459062 110.976473 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"110.976473\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.10 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 114.775691) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 60.459063 82.2465 \n",
       "L 618.459062 82.2465 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"82.2465\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.15 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 86.045718) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_7\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 60.459063 53.516527 \n",
       "L 618.459062 53.516527 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"53.516527\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.20 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 57.315746) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_8\">\n",
       "     <g id=\"line2d_23\">\n",
       "      <path d=\"M 60.459063 24.786554 \n",
       "L 618.459062 24.786554 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_24\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m859795a35a\" x=\"60.459063\" y=\"24.786554\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_13\">\n",
       "      <!-- 0.25 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 28.585773) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_14\">\n",
       "     <!-- Return -->\n",
       "     <g style=\"fill: #555555\" transform=\"translate(16.318125 154.931437) rotate(-90) scale(0.12 -0.12)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-52\" d=\"M 2841 2188 \n",
       "Q 3044 2119 3236 1894 \n",
       "Q 3428 1669 3622 1275 \n",
       "L 4263 0 \n",
       "L 3584 0 \n",
       "L 2988 1197 \n",
       "Q 2756 1666 2539 1819 \n",
       "Q 2322 1972 1947 1972 \n",
       "L 1259 1972 \n",
       "L 1259 0 \n",
       "L 628 0 \n",
       "L 628 4666 \n",
       "L 2053 4666 \n",
       "Q 2853 4666 3247 4331 \n",
       "Q 3641 3997 3641 3322 \n",
       "Q 3641 2881 3436 2590 \n",
       "Q 3231 2300 2841 2188 \n",
       "z\n",
       "M 1259 4147 \n",
       "L 1259 2491 \n",
       "L 2053 2491 \n",
       "Q 2509 2491 2742 2702 \n",
       "Q 2975 2913 2975 3322 \n",
       "Q 2975 3731 2742 3939 \n",
       "Q 2509 4147 2053 4147 \n",
       "L 1259 4147 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
       "L 1172 3500 \n",
       "L 2356 3500 \n",
       "L 2356 3053 \n",
       "L 1172 3053 \n",
       "L 1172 1153 \n",
       "Q 1172 725 1289 603 \n",
       "Q 1406 481 1766 481 \n",
       "L 2356 481 \n",
       "L 2356 0 \n",
       "L 1766 0 \n",
       "Q 1100 0 847 248 \n",
       "Q 594 497 594 1153 \n",
       "L 594 3053 \n",
       "L 172 3053 \n",
       "L 172 3500 \n",
       "L 594 3500 \n",
       "L 594 4494 \n",
       "L 1172 4494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-75\" d=\"M 544 1381 \n",
       "L 544 3500 \n",
       "L 1119 3500 \n",
       "L 1119 1403 \n",
       "Q 1119 906 1312 657 \n",
       "Q 1506 409 1894 409 \n",
       "Q 2359 409 2629 706 \n",
       "Q 2900 1003 2900 1516 \n",
       "L 2900 3500 \n",
       "L 3475 3500 \n",
       "L 3475 0 \n",
       "L 2900 0 \n",
       "L 2900 538 \n",
       "Q 2691 219 2414 64 \n",
       "Q 2138 -91 1772 -91 \n",
       "Q 1169 -91 856 284 \n",
       "Q 544 659 544 1381 \n",
       "z\n",
       "M 1991 3584 \n",
       "L 1991 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6e\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-52\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"64.982422\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"126.505859\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-75\" x=\"165.714844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"229.09375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"268.457031\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_25\">\n",
       "    <path d=\"M 85.822699 176.132256 \n",
       "L 98.74419 99.108623 \n",
       "L 111.665681 172.340372 \n",
       "L 123.753527 235.82175 \n",
       "L 136.675018 136.93583 \n",
       "L 149.179687 74.272451 \n",
       "L 162.101178 160.13197 \n",
       "L 174.605847 161.247236 \n",
       "L 187.527338 107.951218 \n",
       "L 200.448829 131.078111 \n",
       "L 212.953497 201.032835 \n",
       "L 225.874988 165.243138 \n",
       "L 238.379657 169.414366 \n",
       "L 251.301148 201.190274 \n",
       "L 264.222639 182.402741 \n",
       "L 275.893663 173.269335 \n",
       "L 288.815154 189.794519 \n",
       "L 301.319823 155.275651 \n",
       "L 314.241314 230.703695 \n",
       "L 326.745983 188.552686 \n",
       "L 339.667474 185.110619 \n",
       "L 352.588965 163.126582 \n",
       "L 365.093633 189.661824 \n",
       "L 378.015124 231.596412 \n",
       "L 390.519793 90.413982 \n",
       "L 403.441284 149.804583 \n",
       "L 416.362775 190.912213 \n",
       "L 428.033799 150.937693 \n",
       "L 440.95529 222.368054 \n",
       "L 453.459959 143.295516 \n",
       "L 466.38145 153.049057 \n",
       "L 478.886119 232.219769 \n",
       "L 491.80761 176.113468 \n",
       "L 504.729101 192.078264 \n",
       "L 517.233769 112.92698 \n",
       "L 530.15526 178.450133 \n",
       "L 542.659929 164.946976 \n",
       "L 555.58142 214.526266 \n",
       "L 568.502911 185.750796 \n",
       "L 580.173935 34.22175 \n",
       "L 593.095426 191.914177 \n",
       "\" clip-path=\"url(#p3b63c1ca66)\" style=\"fill: none; stroke: #ff0000; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"meeaf506160\" d=\"M 0 1.5 \n",
       "C 0.397805 1.5 0.77937 1.341951 1.06066 1.06066 \n",
       "C 1.341951 0.77937 1.5 0.397805 1.5 0 \n",
       "C 1.5 -0.397805 1.341951 -0.77937 1.06066 -1.06066 \n",
       "C 0.77937 -1.341951 0.397805 -1.5 0 -1.5 \n",
       "C -0.397805 -1.5 -0.77937 -1.341951 -1.06066 -1.06066 \n",
       "C -1.341951 -0.77937 -1.5 -0.397805 -1.5 0 \n",
       "C -1.5 0.397805 -1.341951 0.77937 -1.06066 1.06066 \n",
       "C -0.77937 1.341951 -0.397805 1.5 0 1.5 \n",
       "z\n",
       "\" style=\"stroke: #ff0000\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p3b63c1ca66)\">\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"85.822699\" y=\"176.132256\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"98.74419\" y=\"99.108623\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"111.665681\" y=\"172.340372\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"123.753527\" y=\"235.82175\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"136.675018\" y=\"136.93583\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"149.179687\" y=\"74.272451\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"162.101178\" y=\"160.13197\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"174.605847\" y=\"161.247236\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"187.527338\" y=\"107.951218\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"200.448829\" y=\"131.078111\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"212.953497\" y=\"201.032835\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"225.874988\" y=\"165.243138\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"238.379657\" y=\"169.414366\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"251.301148\" y=\"201.190274\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"264.222639\" y=\"182.402741\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"275.893663\" y=\"173.269335\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"288.815154\" y=\"189.794519\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"301.319823\" y=\"155.275651\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"314.241314\" y=\"230.703695\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"326.745983\" y=\"188.552686\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"339.667474\" y=\"185.110619\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"352.588965\" y=\"163.126582\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"365.093633\" y=\"189.661824\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"378.015124\" y=\"231.596412\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"390.519793\" y=\"90.413982\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"403.441284\" y=\"149.804583\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"416.362775\" y=\"190.912213\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"428.033799\" y=\"150.937693\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"440.95529\" y=\"222.368054\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"453.459959\" y=\"143.295516\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"466.38145\" y=\"153.049057\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"478.886119\" y=\"232.219769\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"491.80761\" y=\"176.113468\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"504.729101\" y=\"192.078264\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"517.233769\" y=\"112.92698\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"530.15526\" y=\"178.450133\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"542.659929\" y=\"164.946976\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"555.58142\" y=\"214.526266\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"568.502911\" y=\"185.750796\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"580.173935\" y=\"34.22175\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#meeaf506160\" x=\"593.095426\" y=\"191.914177\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 60.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 618.459062 245.90175 \n",
       "L 618.459062 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 618.459063 245.90175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 60.459063 24.14175 \n",
       "L 618.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_15\">\n",
       "    <!-- ShenZhen Stock Market Monthly Rrturn -->\n",
       "    <g transform=\"translate(197.444688 18.14175) scale(0.144 -0.144)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-53\" d=\"M 3425 4513 \n",
       "L 3425 3897 \n",
       "Q 3066 4069 2747 4153 \n",
       "Q 2428 4238 2131 4238 \n",
       "Q 1616 4238 1336 4038 \n",
       "Q 1056 3838 1056 3469 \n",
       "Q 1056 3159 1242 3001 \n",
       "Q 1428 2844 1947 2747 \n",
       "L 2328 2669 \n",
       "Q 3034 2534 3370 2195 \n",
       "Q 3706 1856 3706 1288 \n",
       "Q 3706 609 3251 259 \n",
       "Q 2797 -91 1919 -91 \n",
       "Q 1588 -91 1214 -16 \n",
       "Q 841 59 441 206 \n",
       "L 441 856 \n",
       "Q 825 641 1194 531 \n",
       "Q 1563 422 1919 422 \n",
       "Q 2459 422 2753 634 \n",
       "Q 3047 847 3047 1241 \n",
       "Q 3047 1584 2836 1778 \n",
       "Q 2625 1972 2144 2069 \n",
       "L 1759 2144 \n",
       "Q 1053 2284 737 2584 \n",
       "Q 422 2884 422 3419 \n",
       "Q 422 4038 858 4394 \n",
       "Q 1294 4750 2059 4750 \n",
       "Q 2388 4750 2728 4690 \n",
       "Q 3069 4631 3425 4513 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-5a\" d=\"M 359 4666 \n",
       "L 4025 4666 \n",
       "L 4025 4184 \n",
       "L 1075 531 \n",
       "L 4097 531 \n",
       "L 4097 0 \n",
       "L 288 0 \n",
       "L 288 481 \n",
       "L 3238 4134 \n",
       "L 359 4134 \n",
       "L 359 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-6b\" d=\"M 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 1991 \n",
       "L 2875 3500 \n",
       "L 3609 3500 \n",
       "L 1753 1863 \n",
       "L 3688 0 \n",
       "L 2938 0 \n",
       "L 1159 1709 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-4d\" d=\"M 628 4666 \n",
       "L 1569 4666 \n",
       "L 2759 1491 \n",
       "L 3956 4666 \n",
       "L 4897 4666 \n",
       "L 4897 0 \n",
       "L 4281 0 \n",
       "L 4281 4097 \n",
       "L 3078 897 \n",
       "L 2444 897 \n",
       "L 1241 4097 \n",
       "L 1241 0 \n",
       "L 628 0 \n",
       "L 628 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-79\" d=\"M 2059 -325 \n",
       "Q 1816 -950 1584 -1140 \n",
       "Q 1353 -1331 966 -1331 \n",
       "L 506 -1331 \n",
       "L 506 -850 \n",
       "L 844 -850 \n",
       "Q 1081 -850 1212 -737 \n",
       "Q 1344 -625 1503 -206 \n",
       "L 1606 56 \n",
       "L 191 3500 \n",
       "L 800 3500 \n",
       "L 1894 763 \n",
       "L 2988 3500 \n",
       "L 3597 3500 \n",
       "L 2059 -325 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-53\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-68\" x=\"63.476562\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"126.855469\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"188.378906\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-5a\" x=\"251.757812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-68\" x=\"320.263672\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"383.642578\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"445.166016\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"508.544922\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-53\" x=\"540.332031\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"603.808594\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6f\" x=\"643.017578\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-63\" x=\"704.199219\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6b\" x=\"759.179688\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"817.089844\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-4d\" x=\"848.876953\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"935.15625\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-72\" x=\"996.435547\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6b\" x=\"1037.548828\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"1091.833984\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"1153.357422\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"1192.566406\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-4d\" x=\"1224.353516\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6f\" x=\"1310.632812\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1371.814453\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"1435.193359\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-68\" x=\"1474.402344\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"1537.78125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-79\" x=\"1565.564453\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"1624.744141\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-52\" x=\"1656.53125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-72\" x=\"1726.013672\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"1767.126953\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-75\" x=\"1806.335938\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-72\" x=\"1869.714844\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1909.078125\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_7\">\n",
       "     <path d=\"M 526.139063 42.28425 \n",
       "L 612.859063 42.28425 \n",
       "Q 614.459063 42.28425 614.459063 40.68425 \n",
       "L 614.459063 29.74175 \n",
       "Q 614.459063 28.14175 612.859063 28.14175 \n",
       "L 526.139063 28.14175 \n",
       "Q 524.539062 28.14175 524.539062 29.74175 \n",
       "L 524.539062 40.68425 \n",
       "Q 524.539062 42.28425 526.139063 42.28425 \n",
       "z\n",
       "\" style=\"fill: #e5e5e5; opacity: 0.8; stroke: #cccccc; stroke-width: 0.5; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"line2d_26\">\n",
       "     <path d=\"M 527.739063 34.6205 \n",
       "L 535.739063 34.6205 \n",
       "L 543.739063 34.6205 \n",
       "\" style=\"fill: none; stroke: #ff0000; stroke-linecap: square\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#meeaf506160\" x=\"535.739063\" y=\"34.6205\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_16\">\n",
       "     <!-- Monthly Return -->\n",
       "     <g transform=\"translate(550.139063 37.4205) scale(0.08 -0.08)\">\n",
       "      <use xlink:href=\"#DejaVuSans-4d\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"86.279297\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"147.460938\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"210.839844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"250.048828\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\" x=\"313.427734\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-79\" x=\"341.210938\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"400.390625\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-52\" x=\"432.177734\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"497.160156\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"558.683594\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-75\" x=\"597.892578\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"661.271484\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"700.634766\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p3b63c1ca66\">\n",
       "   <rect x=\"60.459063\" y=\"24.14175\" width=\"558\" height=\"221.76\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 1000x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(10,4))\n",
    "\n",
    "ax.plot('Return',#图片数据\n",
    "'.-',#图片类型，可以改成*--等，\n",
    "color='r',#图片颜色\n",
    "label='Monthly Return',#图片标签\n",
    "linewidth=1,#图片线宽\n",
    "data=Month_data)#图片数据来源\n",
    "ax.set_title(\"ShenZhen Stock Market Monthly Rrturn\")\n",
    "ax.set_ylabel('Return')#图片y轴标签\n",
    "ax.set_xlabel('Year')#图片x轴标签\n",
    "#设置x轴的日期显示格式\n",
    "data_format = mdates.DateFormatter('%Y')\n",
    "ax.xaxis.set_major_formatter(data_format)\n",
    "ax.xaxis.set_major_locator(mdates.YearLocator())\n",
    "#转置x轴的日期显示格式\n",
    "plt.xticks(rotation=90)\n",
    "#添加图例\n",
    "plt.legend(loc='upper right',fontsize= 8)\n",
    "fig.savefig('China_Stock_Market_Monthly_Return.pdf')#保存到特定文件夹到d盘\n",
    "\n",
    "\n",
    "plt.show();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 预测变量(月度)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 理论论述Theory Motivation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "用波动率来预测股票的详细论述：\n",
    "波动率衡量的是股票价格或指数的波动程度，通常使用标准差或方差来表示。高波动性：可能表明市场存在不确定性，投资者情绪波动大，这可能导致价格大幅波动。在这种情况下，投资者可能会采取更为保守的策略，或者寻找短线交易机会。低波动性：通常意味着市场相对稳定，投资者信心较高。这可能是长期投资的好时机，但也可能缺乏显著的盈利机会。\n",
    "\n",
    "\n",
    "用涨幅度来预测股票的详细论述：\n",
    "股票涨幅是指股票价格在单位时间内相对于前一交易日的价格变动百分比。\n",
    "股票涨幅的计算方法：涨幅（%）=（当前价格 - 参考价格）/ 参考价格 × 100%。其中，参考价格可以是前一交易日的收盘价，也可以是其他时间节点的价格。\n",
    "通过对股票的历史价格走势进行分析，判断股票的整体趋势。趋势向上且稳定的股票，通常具有较大的上涨潜力。关注股票的成交量和价格之间的关系。当成交量逐渐放大时，表明市场参与者增多，股票上涨的动力增强。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 预测变量和收益率图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 721,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "month\n",
       "2019-11-30         NaN\n",
       "2019-12-31    0.052072\n",
       "2020-01-31    0.134065\n",
       "2020-02-29    0.108814\n",
       "2020-03-31    0.055561\n",
       "2020-04-30    0.108517\n",
       "2020-05-31    0.073830\n",
       "2020-06-30    0.058915\n",
       "2020-07-31    0.059983\n",
       "2020-08-31    0.063643\n",
       "2020-09-30    0.089147\n",
       "2020-10-31    0.073196\n",
       "2020-11-30    0.043616\n",
       "2020-12-31    0.047141\n",
       "2021-01-31    0.078460\n",
       "2021-02-28    0.053157\n",
       "2021-03-31    0.060631\n",
       "2021-04-30    0.056305\n",
       "2021-05-31    0.077516\n",
       "2021-06-30    0.114427\n",
       "2021-07-31    0.080811\n",
       "2021-08-31    0.063320\n",
       "2021-09-30    0.053099\n",
       "2021-10-31    0.069715\n",
       "2021-11-30    0.099231\n",
       "2021-12-31    0.058026\n",
       "2022-01-31    0.057381\n",
       "2022-02-28    0.042405\n",
       "2022-03-31    0.052193\n",
       "2022-04-30    0.043204\n",
       "2022-05-31    0.073189\n",
       "2022-06-30    0.042934\n",
       "2022-07-31    0.045638\n",
       "2022-08-31    0.046610\n",
       "2022-09-30    0.069224\n",
       "2022-10-31    0.049573\n",
       "2022-11-30    0.050189\n",
       "2022-12-31    0.051068\n",
       "2023-01-31    0.058958\n",
       "2023-02-28    0.173157\n",
       "2023-03-31    0.061083\n",
       "Name: Volatility, dtype: float64"
      ]
     },
     "execution_count": 721,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>RV</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>month</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.002712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>0.017973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>0.011840</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.003087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.011776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.005451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.003471</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.003598</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.004050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>0.007947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>0.001902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>0.002222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>0.006156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>0.002826</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>0.003676</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.003170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>0.006009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>0.013094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>0.006530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.004009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>0.002820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>0.004860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.009847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.003367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>0.003293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.001798</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>0.002724</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.001867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.005357</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>0.001843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>0.002083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>0.002173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.004792</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>0.002458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.002519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>0.002608</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>0.003476</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.029983</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>0.003731</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  RV\n",
       "month               \n",
       "2019-11-30       NaN\n",
       "2019-12-31  0.002712\n",
       "2020-01-31  0.017973\n",
       "2020-02-29  0.011840\n",
       "2020-03-31  0.003087\n",
       "2020-04-30  0.011776\n",
       "2020-05-31  0.005451\n",
       "2020-06-30  0.003471\n",
       "2020-07-31  0.003598\n",
       "2020-08-31  0.004050\n",
       "2020-09-30  0.007947\n",
       "2020-10-31  0.005358\n",
       "2020-11-30  0.001902\n",
       "2020-12-31  0.002222\n",
       "2021-01-31  0.006156\n",
       "2021-02-28  0.002826\n",
       "2021-03-31  0.003676\n",
       "2021-04-30  0.003170\n",
       "2021-05-31  0.006009\n",
       "2021-06-30  0.013094\n",
       "2021-07-31  0.006530\n",
       "2021-08-31  0.004009\n",
       "2021-09-30  0.002820\n",
       "2021-10-31  0.004860\n",
       "2021-11-30  0.009847\n",
       "2021-12-31  0.003367\n",
       "2022-01-31  0.003293\n",
       "2022-02-28  0.001798\n",
       "2022-03-31  0.002724\n",
       "2022-04-30  0.001867\n",
       "2022-05-31  0.005357\n",
       "2022-06-30  0.001843\n",
       "2022-07-31  0.002083\n",
       "2022-08-31  0.002173\n",
       "2022-09-30  0.004792\n",
       "2022-10-31  0.002458\n",
       "2022-11-30  0.002519\n",
       "2022-12-31  0.002608\n",
       "2023-01-31  0.003476\n",
       "2023-02-28  0.029983\n",
       "2023-03-31  0.003731"
      ]
     },
     "execution_count": 721,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market_variance = data_new.resample('ME').apply({\n",
    "    'Raw_return':\n",
    "    lambda x: sum(x**2)\n",
    "})\n",
    "market_variance.reset_index(inplace=True)\n",
    "market_variance.rename(columns={'Day':'month','Raw_return':'RV'},inplace=True)\n",
    "market_variance.set_index('month',inplace=True)\n",
    "market_volatility = market_variance['RV'].apply(lambda x: x**0.5)\n",
    "market_volatility.rename('Volatility', inplace=True)\n",
    "market_variance\n",
    "\n",
    "# market_variance <- daily_data[,.(MV = sum(Raw_return^2)),by = 'month'] This is R code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 722,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"788.500937pt\" height=\"285.55175pt\" viewBox=\"0 0 788.500937 285.55175\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2024-11-26T17:16:00.937231</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.8.4, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 285.55175 \n",
       "L 788.500937 285.55175 \n",
       "L 788.500937 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 730.059062 245.90175 \n",
       "L 730.059062 24.14175 \n",
       "L 60.459063 24.14175 \n",
       "z\n",
       "\" style=\"fill: #e5e5e5\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 106.901402 245.90175 \n",
       "L 106.901402 24.14175 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"m1819169d4c\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1819169d4c\" x=\"106.901402\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 2020 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(109.660777 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 289.969752 245.90175 \n",
       "L 289.969752 24.14175 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1819169d4c\" x=\"289.969752\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 2021 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(292.729127 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 472.537915 245.90175 \n",
       "L 472.537915 24.14175 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1819169d4c\" x=\"472.537915\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 2022 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(475.29729 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 655.106078 245.90175 \n",
       "L 655.106078 24.14175 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1819169d4c\" x=\"655.106078\" y=\"245.90175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 2023 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(657.865453 278.35175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 60.459063 225.896364 \n",
       "L 730.059062 225.896364 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <defs>\n",
       "       <path id=\"m603880632f\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"225.896364\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- −0.10 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(22.81375 229.695582) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 60.459063 197.166391 \n",
       "L 730.059062 197.166391 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"197.166391\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- −0.05 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(22.81375 200.96561) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 60.459063 168.436418 \n",
       "L 730.059062 168.436418 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"168.436418\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.00 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 172.235637) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 60.459063 139.706445 \n",
       "L 730.059062 139.706445 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"139.706445\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.05 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 143.505664) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 60.459063 110.976473 \n",
       "L 730.059062 110.976473 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"110.976473\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.10 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 114.775691) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 60.459063 82.2465 \n",
       "L 730.059062 82.2465 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"82.2465\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.15 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 86.045718) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_7\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 60.459063 53.516527 \n",
       "L 730.059062 53.516527 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"53.516527\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.20 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 57.315746) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_8\">\n",
       "     <g id=\"line2d_23\">\n",
       "      <path d=\"M 60.459063 24.786554 \n",
       "L 730.059062 24.786554 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_24\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m603880632f\" x=\"60.459063\" y=\"24.786554\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.25 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 28.585773) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- Stock Market Return -->\n",
       "     <g style=\"fill: #ff0000\" transform=\"translate(16.318125 195.972375) rotate(-90) scale(0.12 -0.12)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-53\" d=\"M 3425 4513 \n",
       "L 3425 3897 \n",
       "Q 3066 4069 2747 4153 \n",
       "Q 2428 4238 2131 4238 \n",
       "Q 1616 4238 1336 4038 \n",
       "Q 1056 3838 1056 3469 \n",
       "Q 1056 3159 1242 3001 \n",
       "Q 1428 2844 1947 2747 \n",
       "L 2328 2669 \n",
       "Q 3034 2534 3370 2195 \n",
       "Q 3706 1856 3706 1288 \n",
       "Q 3706 609 3251 259 \n",
       "Q 2797 -91 1919 -91 \n",
       "Q 1588 -91 1214 -16 \n",
       "Q 841 59 441 206 \n",
       "L 441 856 \n",
       "Q 825 641 1194 531 \n",
       "Q 1563 422 1919 422 \n",
       "Q 2459 422 2753 634 \n",
       "Q 3047 847 3047 1241 \n",
       "Q 3047 1584 2836 1778 \n",
       "Q 2625 1972 2144 2069 \n",
       "L 1759 2144 \n",
       "Q 1053 2284 737 2584 \n",
       "Q 422 2884 422 3419 \n",
       "Q 422 4038 858 4394 \n",
       "Q 1294 4750 2059 4750 \n",
       "Q 2388 4750 2728 4690 \n",
       "Q 3069 4631 3425 4513 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
       "L 1172 3500 \n",
       "L 2356 3500 \n",
       "L 2356 3053 \n",
       "L 1172 3053 \n",
       "L 1172 1153 \n",
       "Q 1172 725 1289 603 \n",
       "Q 1406 481 1766 481 \n",
       "L 2356 481 \n",
       "L 2356 0 \n",
       "L 1766 0 \n",
       "Q 1100 0 847 248 \n",
       "Q 594 497 594 1153 \n",
       "L 594 3053 \n",
       "L 172 3053 \n",
       "L 172 3500 \n",
       "L 594 3500 \n",
       "L 594 4494 \n",
       "L 1172 4494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6b\" d=\"M 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 1991 \n",
       "L 2875 3500 \n",
       "L 3609 3500 \n",
       "L 1753 1863 \n",
       "L 3688 0 \n",
       "L 2938 0 \n",
       "L 1159 1709 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-4d\" d=\"M 628 4666 \n",
       "L 1569 4666 \n",
       "L 2759 1491 \n",
       "L 3956 4666 \n",
       "L 4897 4666 \n",
       "L 4897 0 \n",
       "L 4281 0 \n",
       "L 4281 4097 \n",
       "L 3078 897 \n",
       "L 2444 897 \n",
       "L 1241 4097 \n",
       "L 1241 0 \n",
       "L 628 0 \n",
       "L 628 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
       "Q 2534 3019 2420 3045 \n",
       "Q 2306 3072 2169 3072 \n",
       "Q 1681 3072 1420 2755 \n",
       "Q 1159 2438 1159 1844 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1341 3275 1631 3429 \n",
       "Q 1922 3584 2338 3584 \n",
       "Q 2397 3584 2469 3576 \n",
       "Q 2541 3569 2628 3553 \n",
       "L 2631 2963 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-52\" d=\"M 2841 2188 \n",
       "Q 3044 2119 3236 1894 \n",
       "Q 3428 1669 3622 1275 \n",
       "L 4263 0 \n",
       "L 3584 0 \n",
       "L 2988 1197 \n",
       "Q 2756 1666 2539 1819 \n",
       "Q 2322 1972 1947 1972 \n",
       "L 1259 1972 \n",
       "L 1259 0 \n",
       "L 628 0 \n",
       "L 628 4666 \n",
       "L 2053 4666 \n",
       "Q 2853 4666 3247 4331 \n",
       "Q 3641 3997 3641 3322 \n",
       "Q 3641 2881 3436 2590 \n",
       "Q 3231 2300 2841 2188 \n",
       "z\n",
       "M 1259 4147 \n",
       "L 1259 2491 \n",
       "L 2053 2491 \n",
       "Q 2509 2491 2742 2702 \n",
       "Q 2975 2913 2975 3322 \n",
       "Q 2975 3731 2742 3939 \n",
       "Q 2509 4147 2053 4147 \n",
       "L 1259 4147 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-75\" d=\"M 544 1381 \n",
       "L 544 3500 \n",
       "L 1119 3500 \n",
       "L 1119 1403 \n",
       "Q 1119 906 1312 657 \n",
       "Q 1506 409 1894 409 \n",
       "Q 2359 409 2629 706 \n",
       "Q 2900 1003 2900 1516 \n",
       "L 2900 3500 \n",
       "L 3475 3500 \n",
       "L 3475 0 \n",
       "L 2900 0 \n",
       "L 2900 538 \n",
       "Q 2691 219 2414 64 \n",
       "Q 2138 -91 1772 -91 \n",
       "Q 1169 -91 856 284 \n",
       "Q 544 659 544 1381 \n",
       "z\n",
       "M 1991 3584 \n",
       "L 1991 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6e\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-53\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"63.476562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"102.685547\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"163.867188\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6b\" x=\"218.847656\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"276.757812\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-4d\" x=\"308.544922\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"394.824219\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"456.103516\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6b\" x=\"497.216797\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"551.501953\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"613.025391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"652.234375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-52\" x=\"684.021484\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"749.003906\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"810.527344\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-75\" x=\"849.736328\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"913.115234\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"952.478516\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_25\">\n",
       "    <path d=\"M 90.895426 176.132256 \n",
       "L 106.401215 99.108623 \n",
       "L 121.907005 172.340372 \n",
       "L 136.41242 235.82175 \n",
       "L 151.918209 136.93583 \n",
       "L 166.923812 74.272451 \n",
       "L 182.429601 160.13197 \n",
       "L 197.435204 161.247236 \n",
       "L 212.940993 107.951218 \n",
       "L 228.446782 131.078111 \n",
       "L 243.452384 201.032835 \n",
       "L 258.958174 165.243138 \n",
       "L 273.963776 169.414366 \n",
       "L 289.469565 201.190274 \n",
       "L 304.975354 182.402741 \n",
       "L 318.980583 173.269335 \n",
       "L 334.486373 189.794519 \n",
       "L 349.491975 155.275651 \n",
       "L 364.997764 230.703695 \n",
       "L 380.003367 188.552686 \n",
       "L 395.509156 185.110619 \n",
       "L 411.014945 163.126582 \n",
       "L 426.020548 189.661824 \n",
       "L 441.526337 231.596412 \n",
       "L 456.531939 90.413982 \n",
       "L 472.037728 149.804583 \n",
       "L 487.543518 190.912213 \n",
       "L 501.548747 150.937693 \n",
       "L 517.054536 222.368054 \n",
       "L 532.060138 143.295516 \n",
       "L 547.565927 153.049057 \n",
       "L 562.57153 232.219769 \n",
       "L 578.077319 176.113468 \n",
       "L 593.583108 192.078264 \n",
       "L 608.588711 112.92698 \n",
       "L 624.0945 178.450133 \n",
       "L 639.100102 164.946976 \n",
       "L 654.605892 214.526266 \n",
       "L 670.111681 185.750796 \n",
       "L 684.11691 34.22175 \n",
       "L 699.622699 191.914177 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ff0000; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"me013944b9d\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #ff0000\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p6a3442b1ae)\">\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"90.895426\" y=\"176.132256\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"106.401215\" y=\"99.108623\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"121.907005\" y=\"172.340372\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"136.41242\" y=\"235.82175\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"151.918209\" y=\"136.93583\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"166.923812\" y=\"74.272451\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"182.429601\" y=\"160.13197\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"197.435204\" y=\"161.247236\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"212.940993\" y=\"107.951218\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"228.446782\" y=\"131.078111\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"243.452384\" y=\"201.032835\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"258.958174\" y=\"165.243138\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"273.963776\" y=\"169.414366\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"289.469565\" y=\"201.190274\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"304.975354\" y=\"182.402741\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"318.980583\" y=\"173.269335\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"334.486373\" y=\"189.794519\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"349.491975\" y=\"155.275651\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"364.997764\" y=\"230.703695\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"380.003367\" y=\"188.552686\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"395.509156\" y=\"185.110619\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"411.014945\" y=\"163.126582\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"426.020548\" y=\"189.661824\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"441.526337\" y=\"231.596412\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"456.531939\" y=\"90.413982\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"472.037728\" y=\"149.804583\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"487.543518\" y=\"190.912213\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"501.548747\" y=\"150.937693\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"517.054536\" y=\"222.368054\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"532.060138\" y=\"143.295516\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"547.565927\" y=\"153.049057\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"562.57153\" y=\"232.219769\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"578.077319\" y=\"176.113468\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"593.583108\" y=\"192.078264\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"608.588711\" y=\"112.92698\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"624.0945\" y=\"178.450133\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"639.100102\" y=\"164.946976\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"654.605892\" y=\"214.526266\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"670.111681\" y=\"185.750796\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"684.11691\" y=\"34.22175\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#me013944b9d\" x=\"699.622699\" y=\"191.914177\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 60.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 730.059062 245.90175 \n",
       "L 730.059062 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 730.059063 245.90175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 60.459063 24.14175 \n",
       "L 730.059063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_2\">\n",
       "   <g id=\"matplotlib.axis_3\">\n",
       "    <g id=\"ytick_9\">\n",
       "     <g id=\"line2d_26\">\n",
       "      <path d=\"M 60.459063 212.919933 \n",
       "L 730.059062 212.919933 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_27\">\n",
       "      <defs>\n",
       "       <path id=\"m6fb3b9d301\" d=\"M 0 0 \n",
       "L 3.5 0 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m6fb3b9d301\" x=\"730.059062\" y=\"212.919933\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_14\">\n",
       "      <!-- 0.005 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(737.059062 216.719152) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_10\">\n",
       "     <g id=\"line2d_28\">\n",
       "      <path d=\"M 60.459063 177.156376 \n",
       "L 730.059062 177.156376 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_29\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m6fb3b9d301\" x=\"730.059062\" y=\"177.156376\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_15\">\n",
       "      <!-- 0.010 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(737.059062 180.955595) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_11\">\n",
       "     <g id=\"line2d_30\">\n",
       "      <path d=\"M 60.459063 141.392819 \n",
       "L 730.059062 141.392819 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_31\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m6fb3b9d301\" x=\"730.059062\" y=\"141.392819\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_16\">\n",
       "      <!-- 0.015 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(737.059062 145.192038) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_12\">\n",
       "     <g id=\"line2d_32\">\n",
       "      <path d=\"M 60.459063 105.629262 \n",
       "L 730.059062 105.629262 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_33\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m6fb3b9d301\" x=\"730.059062\" y=\"105.629262\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_17\">\n",
       "      <!-- 0.020 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(737.059062 109.428481) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_13\">\n",
       "     <g id=\"line2d_34\">\n",
       "      <path d=\"M 60.459063 69.865705 \n",
       "L 730.059062 69.865705 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_35\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m6fb3b9d301\" x=\"730.059062\" y=\"69.865705\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_18\">\n",
       "      <!-- 0.025 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(737.059062 73.664924) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_14\">\n",
       "     <g id=\"line2d_36\">\n",
       "      <path d=\"M 60.459063 34.102148 \n",
       "L 730.059062 34.102148 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_37\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m6fb3b9d301\" x=\"730.059062\" y=\"34.102148\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_19\">\n",
       "      <!-- 0.030 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(737.059062 37.901367) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_20\">\n",
       "     <!-- RV -->\n",
       "     <g style=\"fill: #0000ff\" transform=\"translate(778.805312 142.965187) rotate(-90) scale(0.12 -0.12)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-56\" d=\"M 1831 0 \n",
       "L 50 4666 \n",
       "L 709 4666 \n",
       "L 2188 738 \n",
       "L 3669 4666 \n",
       "L 4325 4666 \n",
       "L 2547 0 \n",
       "L 1831 0 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-52\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-56\" x=\"63.982422\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_38\">\n",
       "    <path d=\"M 121.907005 229.288756 \n",
       "L 136.41242 120.125568 \n",
       "L 151.918209 163.992282 \n",
       "L 166.923812 226.603021 \n",
       "L 182.429601 164.453405 \n",
       "L 197.435204 209.69448 \n",
       "L 212.940993 223.856482 \n",
       "L 228.446782 222.948104 \n",
       "L 243.452384 219.712196 \n",
       "L 258.958174 191.840111 \n",
       "L 273.963776 210.361709 \n",
       "L 289.469565 235.076515 \n",
       "L 304.975354 232.787904 \n",
       "L 318.980583 204.651475 \n",
       "L 334.486373 228.472662 \n",
       "L 349.491975 222.389318 \n",
       "L 364.997764 226.007515 \n",
       "L 380.003367 205.705149 \n",
       "L 395.509156 155.029006 \n",
       "L 411.014945 201.972876 \n",
       "L 426.020548 220.005022 \n",
       "L 441.526337 228.516052 \n",
       "L 456.531939 213.919996 \n",
       "L 472.037728 178.251935 \n",
       "L 487.543518 224.600048 \n",
       "L 501.548747 225.132794 \n",
       "L 517.054536 235.82175 \n",
       "L 532.060138 229.198542 \n",
       "L 547.565927 235.332339 \n",
       "L 562.57153 210.369246 \n",
       "L 578.077319 235.498722 \n",
       "L 593.583108 233.785675 \n",
       "L 608.588711 233.144069 \n",
       "L 624.0945 214.407527 \n",
       "L 639.100102 231.105624 \n",
       "L 654.605892 230.666535 \n",
       "L 670.111681 230.029777 \n",
       "L 684.11691 223.82071 \n",
       "L 699.622699 34.22175 \n",
       "\" clip-path=\"url(#p6a3442b1ae)\" style=\"fill: none; stroke: #0000ff; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"med16b8c35a\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #0000ff\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p6a3442b1ae)\">\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"121.907005\" y=\"229.288756\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"136.41242\" y=\"120.125568\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"151.918209\" y=\"163.992282\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"166.923812\" y=\"226.603021\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"182.429601\" y=\"164.453405\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"197.435204\" y=\"209.69448\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"212.940993\" y=\"223.856482\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"228.446782\" y=\"222.948104\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"243.452384\" y=\"219.712196\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"258.958174\" y=\"191.840111\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"273.963776\" y=\"210.361709\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"289.469565\" y=\"235.076515\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"304.975354\" y=\"232.787904\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"318.980583\" y=\"204.651475\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"334.486373\" y=\"228.472662\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"349.491975\" y=\"222.389318\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"364.997764\" y=\"226.007515\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"380.003367\" y=\"205.705149\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"395.509156\" y=\"155.029006\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"411.014945\" y=\"201.972876\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"426.020548\" y=\"220.005022\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"441.526337\" y=\"228.516052\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"456.531939\" y=\"213.919996\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"472.037728\" y=\"178.251935\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"487.543518\" y=\"224.600048\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"501.548747\" y=\"225.132794\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"517.054536\" y=\"235.82175\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"532.060138\" y=\"229.198542\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"547.565927\" y=\"235.332339\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"562.57153\" y=\"210.369246\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"578.077319\" y=\"235.498722\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"593.583108\" y=\"233.785675\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"608.588711\" y=\"233.144069\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"624.0945\" y=\"214.407527\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"639.100102\" y=\"231.105624\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"654.605892\" y=\"230.666535\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"670.111681\" y=\"230.029777\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"684.11691\" y=\"223.82071\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#med16b8c35a\" x=\"699.622699\" y=\"34.22175\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_7\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 60.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_8\">\n",
       "    <path d=\"M 730.059062 245.90175 \n",
       "L 730.059062 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_9\">\n",
       "    <path d=\"M 60.459063 245.90175 \n",
       "L 730.059063 245.90175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_10\">\n",
       "    <path d=\"M 60.459063 24.14175 \n",
       "L 730.059063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_21\">\n",
       "    <!-- China Stock Market Return and Inflation -->\n",
       "    <g transform=\"translate(251.715813 18.14175) scale(0.144 -0.144)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-43\" d=\"M 4122 4306 \n",
       "L 4122 3641 \n",
       "Q 3803 3938 3442 4084 \n",
       "Q 3081 4231 2675 4231 \n",
       "Q 1875 4231 1450 3742 \n",
       "Q 1025 3253 1025 2328 \n",
       "Q 1025 1406 1450 917 \n",
       "Q 1875 428 2675 428 \n",
       "Q 3081 428 3442 575 \n",
       "Q 3803 722 4122 1019 \n",
       "L 4122 359 \n",
       "Q 3791 134 3420 21 \n",
       "Q 3050 -91 2638 -91 \n",
       "Q 1578 -91 968 557 \n",
       "Q 359 1206 359 2328 \n",
       "Q 359 3453 968 4101 \n",
       "Q 1578 4750 2638 4750 \n",
       "Q 3056 4750 3426 4639 \n",
       "Q 3797 4528 4122 4306 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
       "L 1178 3500 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 3500 \n",
       "z\n",
       "M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 4134 \n",
       "L 603 4134 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-64\" d=\"M 2906 2969 \n",
       "L 2906 4863 \n",
       "L 3481 4863 \n",
       "L 3481 0 \n",
       "L 2906 0 \n",
       "L 2906 525 \n",
       "Q 2725 213 2448 61 \n",
       "Q 2172 -91 1784 -91 \n",
       "Q 1150 -91 751 415 \n",
       "Q 353 922 353 1747 \n",
       "Q 353 2572 751 3078 \n",
       "Q 1150 3584 1784 3584 \n",
       "Q 2172 3584 2448 3432 \n",
       "Q 2725 3281 2906 2969 \n",
       "z\n",
       "M 947 1747 \n",
       "Q 947 1113 1208 752 \n",
       "Q 1469 391 1925 391 \n",
       "Q 2381 391 2643 752 \n",
       "Q 2906 1113 2906 1747 \n",
       "Q 2906 2381 2643 2742 \n",
       "Q 2381 3103 1925 3103 \n",
       "Q 1469 3103 1208 2742 \n",
       "Q 947 2381 947 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-49\" d=\"M 628 4666 \n",
       "L 1259 4666 \n",
       "L 1259 0 \n",
       "L 628 0 \n",
       "L 628 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-66\" d=\"M 2375 4863 \n",
       "L 2375 4384 \n",
       "L 1825 4384 \n",
       "Q 1516 4384 1395 4259 \n",
       "Q 1275 4134 1275 3809 \n",
       "L 1275 3500 \n",
       "L 2222 3500 \n",
       "L 2222 3053 \n",
       "L 1275 3053 \n",
       "L 1275 0 \n",
       "L 697 0 \n",
       "L 697 3053 \n",
       "L 147 3053 \n",
       "L 147 3500 \n",
       "L 697 3500 \n",
       "L 697 3744 \n",
       "Q 697 4328 969 4595 \n",
       "Q 1241 4863 1831 4863 \n",
       "L 2375 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-43\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-68\" x=\"69.824219\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-69\" x=\"133.203125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"160.986328\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"224.365234\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"285.644531\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-53\" x=\"317.431641\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"380.908203\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6f\" x=\"420.117188\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-63\" x=\"481.298828\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6b\" x=\"536.279297\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"594.189453\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-4d\" x=\"625.976562\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"712.255859\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-72\" x=\"773.535156\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6b\" x=\"814.648438\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"868.933594\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"930.457031\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"969.666016\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-52\" x=\"1001.453125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"1066.435547\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"1127.958984\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-75\" x=\"1167.167969\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-72\" x=\"1230.546875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1269.910156\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"1333.289062\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"1365.076172\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1426.355469\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-64\" x=\"1489.734375\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"1553.210938\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-49\" x=\"1584.998047\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1614.490234\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-66\" x=\"1677.869141\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6c\" x=\"1713.074219\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"1740.857422\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"1802.136719\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-69\" x=\"1841.345703\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6f\" x=\"1869.128906\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1930.310547\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_11\">\n",
       "     <path d=\"M 589.474687 61.498 \n",
       "L 723.059062 61.498 \n",
       "Q 725.059062 61.498 725.059062 59.498 \n",
       "L 725.059062 31.14175 \n",
       "Q 725.059062 29.14175 723.059062 29.14175 \n",
       "L 589.474687 29.14175 \n",
       "Q 587.474687 29.14175 587.474687 31.14175 \n",
       "L 587.474687 59.498 \n",
       "Q 587.474687 61.498 589.474687 61.498 \n",
       "z\n",
       "\" style=\"fill: #e5e5e5; opacity: 0.8; stroke: #cccccc; stroke-width: 0.5; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"line2d_39\">\n",
       "     <path d=\"M 591.474687 37.240188 \n",
       "L 601.474687 37.240188 \n",
       "L 611.474687 37.240188 \n",
       "\" style=\"fill: none; stroke: #ff0000; stroke-linecap: square\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#me013944b9d\" x=\"601.474687\" y=\"37.240188\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_22\">\n",
       "     <!-- Stock Market Return -->\n",
       "     <g transform=\"translate(619.474687 40.740188) scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-53\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"63.476562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"102.685547\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"163.867188\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6b\" x=\"218.847656\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"276.757812\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-4d\" x=\"308.544922\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"394.824219\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"456.103516\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6b\" x=\"497.216797\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"551.501953\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"613.025391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"652.234375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-52\" x=\"684.021484\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"749.003906\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"810.527344\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-75\" x=\"849.736328\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"913.115234\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"952.478516\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_40\">\n",
       "     <path d=\"M 591.474687 51.918313 \n",
       "L 601.474687 51.918313 \n",
       "L 611.474687 51.918313 \n",
       "\" style=\"fill: none; stroke: #0000ff; stroke-linecap: square\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#med16b8c35a\" x=\"601.474687\" y=\"51.918313\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_23\">\n",
       "     <!-- variance -->\n",
       "     <g transform=\"translate(619.474687 55.418313) scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-76\" d=\"M 191 3500 \n",
       "L 800 3500 \n",
       "L 1894 563 \n",
       "L 2988 3500 \n",
       "L 3597 3500 \n",
       "L 2284 0 \n",
       "L 1503 0 \n",
       "L 191 3500 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-76\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"59.179688\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"120.458984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-69\" x=\"161.572266\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"189.355469\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"250.634766\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"314.013672\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"368.994141\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p6a3442b1ae\">\n",
       "   <rect x=\"60.459063\" y=\"24.14175\" width=\"669.6\" height=\"221.76\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 1200x400 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.style.use('ggplot')\n",
    "fig, ax1 = plt.subplots(figsize=(12, 4))\n",
    "\n",
    "ax1.plot(Month_data['Return'],\n",
    "            color='r',\n",
    "            marker='o',\n",
    "            linewidth=1,\n",
    "            label='Stock Market Return')\n",
    "ax1.set_ylabel('Stock Market Return', color='r')\n",
    "\n",
    "data_format = mdates.DateFormatter('%Y')\n",
    "ax1.xaxis.set_major_formatter(data_format)\n",
    "ax1.xaxis.set_major_locator(mdates.YearLocator())\n",
    "plt.xticks(rotation=90)\n",
    "\n",
    "ax2 = ax1.twinx()\n",
    "ax2.plot(market_variance['RV'].shift(1),\n",
    "            color='b',\n",
    "            marker='o',\n",
    "            linewidth=1,\n",
    "            label='variance')\n",
    "ax2.set_ylabel('RV', color='b')\n",
    "\n",
    "plt.title('China Stock Market Return and Inflation')\n",
    "\n",
    "lines, labels = ax1.get_legend_handles_labels()\n",
    "lines2, labels2 = ax2.get_legend_handles_labels()\n",
    "ax2.legend(lines + lines2, labels + labels2, loc='upper right')\n",
    "\n",
    "plt.show();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 723,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>Highest</th>\n",
       "      <th>Lowest</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>money</th>\n",
       "      <th>Preclose</th>\n",
       "      <th>Return</th>\n",
       "      <th>Raw_return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-26</th>\n",
       "      <td>7803.78</td>\n",
       "      <td>7819.02</td>\n",
       "      <td>7744.88</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>3575.59</td>\n",
       "      <td>367.85</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-27</th>\n",
       "      <td>7762.64</td>\n",
       "      <td>7777.02</td>\n",
       "      <td>7713.12</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>2184.40</td>\n",
       "      <td>261.01</td>\n",
       "      <td>7800.86</td>\n",
       "      <td>-0.008725</td>\n",
       "      <td>-0.008725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-28</th>\n",
       "      <td>7740.17</td>\n",
       "      <td>7748.23</td>\n",
       "      <td>7681.43</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>1724.93</td>\n",
       "      <td>207.40</td>\n",
       "      <td>7732.80</td>\n",
       "      <td>-0.003871</td>\n",
       "      <td>-0.003871</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-29</th>\n",
       "      <td>7703.89</td>\n",
       "      <td>7728.83</td>\n",
       "      <td>7618.24</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>2048.50</td>\n",
       "      <td>252.47</td>\n",
       "      <td>7702.87</td>\n",
       "      <td>-0.003626</td>\n",
       "      <td>-0.003626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>7703.00</td>\n",
       "      <td>7731.77</td>\n",
       "      <td>7684.46</td>\n",
       "      <td>7696.38</td>\n",
       "      <td>1969.28</td>\n",
       "      <td>232.69</td>\n",
       "      <td>7674.94</td>\n",
       "      <td>0.002794</td>\n",
       "      <td>0.002794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-17</th>\n",
       "      <td>7738.34</td>\n",
       "      <td>7765.41</td>\n",
       "      <td>7603.81</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>6144.71</td>\n",
       "      <td>998.94</td>\n",
       "      <td>7742.17</td>\n",
       "      <td>0.002631</td>\n",
       "      <td>0.002631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-18</th>\n",
       "      <td>7739.32</td>\n",
       "      <td>7790.46</td>\n",
       "      <td>7715.31</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>4605.38</td>\n",
       "      <td>799.38</td>\n",
       "      <td>7762.54</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>0.000805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-19</th>\n",
       "      <td>7745.59</td>\n",
       "      <td>7761.12</td>\n",
       "      <td>7701.05</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>4577.73</td>\n",
       "      <td>807.83</td>\n",
       "      <td>7768.79</td>\n",
       "      <td>-0.003151</td>\n",
       "      <td>-0.003151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-20</th>\n",
       "      <td>7729.24</td>\n",
       "      <td>7752.50</td>\n",
       "      <td>7506.26</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>5521.65</td>\n",
       "      <td>940.34</td>\n",
       "      <td>7744.31</td>\n",
       "      <td>-0.030717</td>\n",
       "      <td>-0.030717</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-21</th>\n",
       "      <td>7515.05</td>\n",
       "      <td>7566.69</td>\n",
       "      <td>7421.24</td>\n",
       "      <td>7489.21</td>\n",
       "      <td>4695.98</td>\n",
       "      <td>809.44</td>\n",
       "      <td>7506.43</td>\n",
       "      <td>-0.002294</td>\n",
       "      <td>-0.002294</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1212 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               Open  Highest   Lowest    Close   Volume   money  Preclose  \\\n",
       "Day                                                                         \n",
       "2019-11-26  7803.78  7819.02  7744.88  7800.86  3575.59  367.85       NaN   \n",
       "2019-11-27  7762.64  7777.02  7713.12  7732.80  2184.40  261.01   7800.86   \n",
       "2019-11-28  7740.17  7748.23  7681.43  7702.87  1724.93  207.40   7732.80   \n",
       "2019-11-29  7703.89  7728.83  7618.24  7674.94  2048.50  252.47   7702.87   \n",
       "2019-11-30  7703.00  7731.77  7684.46  7696.38  1969.28  232.69   7674.94   \n",
       "...             ...      ...      ...      ...      ...     ...       ...   \n",
       "2023-03-17  7738.34  7765.41  7603.81  7762.54  6144.71  998.94   7742.17   \n",
       "2023-03-18  7739.32  7790.46  7715.31  7768.79  4605.38  799.38   7762.54   \n",
       "2023-03-19  7745.59  7761.12  7701.05  7744.31  4577.73  807.83   7768.79   \n",
       "2023-03-20  7729.24  7752.50  7506.26  7506.43  5521.65  940.34   7744.31   \n",
       "2023-03-21  7515.05  7566.69  7421.24  7489.21  4695.98  809.44   7506.43   \n",
       "\n",
       "              Return  Raw_return  \n",
       "Day                               \n",
       "2019-11-26       NaN         NaN  \n",
       "2019-11-27 -0.008725   -0.008725  \n",
       "2019-11-28 -0.003871   -0.003871  \n",
       "2019-11-29 -0.003626   -0.003626  \n",
       "2019-11-30  0.002794    0.002794  \n",
       "...              ...         ...  \n",
       "2023-03-17  0.002631    0.002631  \n",
       "2023-03-18  0.000805    0.000805  \n",
       "2023-03-19 -0.003151   -0.003151  \n",
       "2023-03-20 -0.030717   -0.030717  \n",
       "2023-03-21 -0.002294   -0.002294  \n",
       "\n",
       "[1212 rows x 9 columns]"
      ]
     },
     "execution_count": 723,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_new=data['2019-11':'2023-03'].copy()\n",
    "data_new['Close']=pd.to_numeric(data_new['Close'])\n",
    "data_new['Preclose']=pd.to_numeric(data_new['Preclose'])\n",
    "data_new['Raw_return']=data_new['Close']/data_new['Preclose']-1\n",
    "data_new"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 724,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Raw_return</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>-0.013393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.120654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.117274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014453</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.056729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005557</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.057003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024306</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022904</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.108366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029019</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.036939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.109920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.032426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.030454</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.093860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026779</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.111005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013361</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.041145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.080212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>-0.040859</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Raw_return\n",
       "Day                   \n",
       "2019-11-30   -0.013393\n",
       "2019-12-31    0.120654\n",
       "2020-01-31   -0.006794\n",
       "2020-02-29   -0.117274\n",
       "2020-03-31    0.054822\n",
       "2020-04-30    0.163878\n",
       "2020-05-31    0.014453\n",
       "2020-06-30    0.012512\n",
       "2020-07-31    0.105265\n",
       "2020-08-31    0.065016\n",
       "2020-09-30   -0.056729\n",
       "2020-10-31    0.005557\n",
       "2020-11-30   -0.001702\n",
       "2020-12-31   -0.057003\n",
       "2021-01-31   -0.024306\n",
       "2021-02-28   -0.008411\n",
       "2021-03-31   -0.037170\n",
       "2021-04-30    0.022904\n",
       "2021-05-31   -0.108366\n",
       "2021-06-30   -0.035009\n",
       "2021-07-31   -0.029019\n",
       "2021-08-31    0.009241\n",
       "2021-09-30   -0.036939\n",
       "2021-10-31   -0.109920\n",
       "2021-11-30    0.135786\n",
       "2021-12-31    0.032426\n",
       "2022-01-31   -0.039116\n",
       "2022-02-28    0.030454\n",
       "2022-03-31   -0.093860\n",
       "2022-04-30    0.043754\n",
       "2022-05-31    0.026779\n",
       "2022-06-30   -0.111005\n",
       "2022-07-31   -0.013361\n",
       "2022-08-31   -0.041145\n",
       "2022-09-30    0.096605\n",
       "2022-10-31   -0.017427\n",
       "2022-11-30    0.006073\n",
       "2022-12-31   -0.080212\n",
       "2023-01-31   -0.030133\n",
       "2023-02-28    0.233580\n",
       "2023-03-31   -0.040859"
      ]
     },
     "execution_count": 724,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Month_data=data_new.resample('ME')['Raw_return'].apply(lambda x:(1+x).prod()-1).to_frame()\n",
    "Month_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 725,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>change</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-26</th>\n",
       "      <td>11.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-27</th>\n",
       "      <td>-35.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-28</th>\n",
       "      <td>-22.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-29</th>\n",
       "      <td>-17.93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>25.16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-17</th>\n",
       "      <td>52.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-18</th>\n",
       "      <td>26.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-19</th>\n",
       "      <td>-17.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-20</th>\n",
       "      <td>-218.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-21</th>\n",
       "      <td>-15.49</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1212 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            change\n",
       "Day               \n",
       "2019-11-26   11.40\n",
       "2019-11-27  -35.27\n",
       "2019-11-28  -22.67\n",
       "2019-11-29  -17.93\n",
       "2019-11-30   25.16\n",
       "...            ...\n",
       "2023-03-17   52.51\n",
       "2023-03-18   26.69\n",
       "2023-03-19  -17.95\n",
       "2023-03-20 -218.25\n",
       "2023-03-21  -15.49\n",
       "\n",
       "[1212 rows x 1 columns]"
      ]
     },
     "execution_count": 725,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "change=pd.read_csv('datasets/change.csv')\n",
    "change['Day']=pd.to_datetime(change['Day'],format='%Y/%m/%d')\n",
    "change.set_index('Day',inplace=True)\n",
    "change.sort_values(by=['Day'],axis=0,ascending=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 726,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Raw_return</th>\n",
       "      <th>change</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>-0.013393</td>\n",
       "      <td>25.16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.120654</td>\n",
       "      <td>-41.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006794</td>\n",
       "      <td>-108.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.117274</td>\n",
       "      <td>42.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "      <td>26.11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "      <td>307.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014453</td>\n",
       "      <td>35.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012512</td>\n",
       "      <td>-23.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "      <td>-78.66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "      <td>147.35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.056729</td>\n",
       "      <td>-217.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005557</td>\n",
       "      <td>-1.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001702</td>\n",
       "      <td>-24.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.057003</td>\n",
       "      <td>-12.41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024306</td>\n",
       "      <td>107.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008411</td>\n",
       "      <td>53.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037170</td>\n",
       "      <td>75.76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022904</td>\n",
       "      <td>73.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.108366</td>\n",
       "      <td>-257.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035009</td>\n",
       "      <td>-188.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029019</td>\n",
       "      <td>-51.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009241</td>\n",
       "      <td>-29.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.036939</td>\n",
       "      <td>-13.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.109920</td>\n",
       "      <td>-35.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "      <td>16.66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.032426</td>\n",
       "      <td>47.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039116</td>\n",
       "      <td>-118.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.030454</td>\n",
       "      <td>27.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.093860</td>\n",
       "      <td>9.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "      <td>13.33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026779</td>\n",
       "      <td>110.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.111005</td>\n",
       "      <td>29.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013361</td>\n",
       "      <td>33.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.041145</td>\n",
       "      <td>-24.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "      <td>58.14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017427</td>\n",
       "      <td>20.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006073</td>\n",
       "      <td>2.96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.080212</td>\n",
       "      <td>6.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030133</td>\n",
       "      <td>-68.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "      <td>83.91</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Raw_return  change\n",
       "Day                           \n",
       "2019-11-30   -0.013393   25.16\n",
       "2019-12-31    0.120654  -41.08\n",
       "2020-01-31   -0.006794 -108.69\n",
       "2020-02-29   -0.117274   42.03\n",
       "2020-03-31    0.054822   26.11\n",
       "2020-04-30    0.163878  307.83\n",
       "2020-05-31    0.014453   35.52\n",
       "2020-06-30    0.012512  -23.79\n",
       "2020-07-31    0.105265  -78.66\n",
       "2020-08-31    0.065016  147.35\n",
       "2020-09-30   -0.056729 -217.56\n",
       "2020-10-31    0.005557   -1.05\n",
       "2020-11-30   -0.001702  -24.17\n",
       "2020-12-31   -0.057003  -12.41\n",
       "2021-01-31   -0.024306  107.78\n",
       "2021-02-28   -0.008411   53.62\n",
       "2021-03-31   -0.037170   75.76\n",
       "2021-04-30    0.022904   73.45\n",
       "2021-05-31   -0.108366 -257.57\n",
       "2021-06-30   -0.035009 -188.60\n",
       "2021-07-31   -0.029019  -51.74\n",
       "2021-08-31    0.009241  -29.31\n",
       "2021-09-30   -0.036939  -13.04\n",
       "2021-10-31   -0.109920  -35.30\n",
       "2021-11-30    0.135786   16.66\n",
       "2021-12-31    0.032426   47.53\n",
       "2022-01-31   -0.039116 -118.53\n",
       "2022-02-28    0.030454   27.08\n",
       "2022-03-31   -0.093860    9.03\n",
       "2022-04-30    0.043754   13.33\n",
       "2022-05-31    0.026779  110.18\n",
       "2022-06-30   -0.111005   29.57\n",
       "2022-07-31   -0.013361   33.32\n",
       "2022-08-31   -0.041145  -24.54\n",
       "2022-09-30    0.096605   58.14\n",
       "2022-10-31   -0.017427   20.38\n",
       "2022-11-30    0.006073    2.96\n",
       "2022-12-31   -0.080212    6.78\n",
       "2023-01-31   -0.030133  -68.82\n",
       "2023-02-28    0.233580   83.91"
      ]
     },
     "execution_count": 726,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_data=pd.merge(Month_data,change,left_index=True,right_index=True)\n",
    "reg_data=reg_data['2019':]\n",
    "reg_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 727,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"954.74pt\" height=\"396.43175pt\" viewBox=\"0 0 954.74 396.43175\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2024-11-26T17:16:01.142507</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.8.4, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 396.43175 \n",
       "L 954.74 396.43175 \n",
       "L 954.74 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 60.459063 356.78175 \n",
       "L 897.459062 356.78175 \n",
       "L 897.459062 24.14175 \n",
       "L 60.459063 24.14175 \n",
       "z\n",
       "\" style=\"fill: #e5e5e5\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 119.034948 356.78175 \n",
       "L 119.034948 24.14175 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"mc3d9072336\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc3d9072336\" x=\"119.034948\" y=\"356.78175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 2020 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(121.794323 389.23175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 353.85175 356.78175 \n",
       "L 353.85175 24.14175 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc3d9072336\" x=\"353.85175\" y=\"356.78175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 2021 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(356.611125 389.23175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 588.026976 356.78175 \n",
       "L 588.026976 24.14175 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc3d9072336\" x=\"588.026976\" y=\"356.78175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 2022 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(590.786351 389.23175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 822.202202 356.78175 \n",
       "L 822.202202 24.14175 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc3d9072336\" x=\"822.202202\" y=\"356.78175\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 2023 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(824.961577 389.23175) rotate(-90) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 60.459063 326.773671 \n",
       "L 897.459062 326.773671 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <defs>\n",
       "       <path id=\"mdecb00107f\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"326.773671\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- −0.10 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(22.81375 330.572889) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 60.459063 283.678711 \n",
       "L 897.459062 283.678711 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"283.678711\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- −0.05 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(22.81375 287.47793) scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 60.459063 240.583752 \n",
       "L 897.459062 240.583752 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"240.583752\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.00 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 244.382971) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 60.459063 197.488793 \n",
       "L 897.459062 197.488793 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"197.488793\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.05 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 201.288012) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 60.459063 154.393834 \n",
       "L 897.459062 154.393834 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"154.393834\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.10 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 158.193053) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 60.459063 111.298875 \n",
       "L 897.459062 111.298875 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"111.298875\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.15 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 115.098093) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_7\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 60.459063 68.203915 \n",
       "L 897.459062 68.203915 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"68.203915\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.20 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 72.003134) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_8\">\n",
       "     <g id=\"line2d_23\">\n",
       "      <path d=\"M 60.459063 25.108956 \n",
       "L 897.459062 25.108956 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_24\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mdecb00107f\" x=\"60.459063\" y=\"25.108956\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.25 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(31.193438 28.908175) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- Return -->\n",
       "     <g style=\"fill: #ff0000\" transform=\"translate(16.318125 210.371437) rotate(-90) scale(0.12 -0.12)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-52\" d=\"M 2841 2188 \n",
       "Q 3044 2119 3236 1894 \n",
       "Q 3428 1669 3622 1275 \n",
       "L 4263 0 \n",
       "L 3584 0 \n",
       "L 2988 1197 \n",
       "Q 2756 1666 2539 1819 \n",
       "Q 2322 1972 1947 1972 \n",
       "L 1259 1972 \n",
       "L 1259 0 \n",
       "L 628 0 \n",
       "L 628 4666 \n",
       "L 2053 4666 \n",
       "Q 2853 4666 3247 4331 \n",
       "Q 3641 3997 3641 3322 \n",
       "Q 3641 2881 3436 2590 \n",
       "Q 3231 2300 2841 2188 \n",
       "z\n",
       "M 1259 4147 \n",
       "L 1259 2491 \n",
       "L 2053 2491 \n",
       "Q 2509 2491 2742 2702 \n",
       "Q 2975 2913 2975 3322 \n",
       "Q 2975 3731 2742 3939 \n",
       "Q 2509 4147 2053 4147 \n",
       "L 1259 4147 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
       "L 1172 3500 \n",
       "L 2356 3500 \n",
       "L 2356 3053 \n",
       "L 1172 3053 \n",
       "L 1172 1153 \n",
       "Q 1172 725 1289 603 \n",
       "Q 1406 481 1766 481 \n",
       "L 2356 481 \n",
       "L 2356 0 \n",
       "L 1766 0 \n",
       "Q 1100 0 847 248 \n",
       "Q 594 497 594 1153 \n",
       "L 594 3053 \n",
       "L 172 3053 \n",
       "L 172 3500 \n",
       "L 594 3500 \n",
       "L 594 4494 \n",
       "L 1172 4494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-75\" d=\"M 544 1381 \n",
       "L 544 3500 \n",
       "L 1119 3500 \n",
       "L 1119 1403 \n",
       "Q 1119 906 1312 657 \n",
       "Q 1506 409 1894 409 \n",
       "Q 2359 409 2629 706 \n",
       "Q 2900 1003 2900 1516 \n",
       "L 2900 3500 \n",
       "L 3475 3500 \n",
       "L 3475 0 \n",
       "L 2900 0 \n",
       "L 2900 538 \n",
       "Q 2691 219 2414 64 \n",
       "Q 2138 -91 1772 -91 \n",
       "Q 1169 -91 856 284 \n",
       "Q 544 659 544 1381 \n",
       "z\n",
       "M 1991 3584 \n",
       "L 1991 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-72\" d=\"M 2631 2963 \n",
       "Q 2534 3019 2420 3045 \n",
       "Q 2306 3072 2169 3072 \n",
       "Q 1681 3072 1420 2755 \n",
       "Q 1159 2438 1159 1844 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1341 3275 1631 3429 \n",
       "Q 1922 3584 2338 3584 \n",
       "Q 2397 3584 2469 3576 \n",
       "Q 2541 3569 2628 3553 \n",
       "L 2631 2963 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6e\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-52\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"64.982422\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"126.505859\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-75\" x=\"165.714844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"229.09375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"268.457031\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_25\">\n",
       "    <path d=\"M 98.504517 252.127508 \n",
       "L 118.393372 136.59206 \n",
       "L 138.282227 246.439684 \n",
       "L 156.88793 341.66175 \n",
       "L 176.776784 193.33287 \n",
       "L 196.024063 99.337802 \n",
       "L 215.912918 228.12708 \n",
       "L 235.160197 229.79998 \n",
       "L 255.049052 149.855952 \n",
       "L 274.937907 184.546292 \n",
       "L 294.185185 289.478378 \n",
       "L 314.07404 235.793831 \n",
       "L 333.321319 242.050674 \n",
       "L 353.210174 289.714536 \n",
       "L 373.099029 261.533237 \n",
       "L 391.063156 247.833128 \n",
       "L 410.952011 272.620903 \n",
       "L 430.199289 220.842601 \n",
       "L 450.088144 333.984668 \n",
       "L 469.335423 270.758154 \n",
       "L 489.224278 265.595053 \n",
       "L 509.113133 232.618998 \n",
       "L 528.360412 272.421861 \n",
       "L 548.249266 335.323743 \n",
       "L 567.496545 123.550098 \n",
       "L 587.3854 212.636 \n",
       "L 607.274255 274.297445 \n",
       "L 625.238382 214.335665 \n",
       "L 645.127237 321.481206 \n",
       "L 664.374516 202.872399 \n",
       "L 684.26337 217.50271 \n",
       "L 703.510649 336.258779 \n",
       "L 723.399504 252.099327 \n",
       "L 743.288359 276.046521 \n",
       "L 762.535638 157.319595 \n",
       "L 782.424493 255.604325 \n",
       "L 801.671771 235.349589 \n",
       "L 821.560626 309.718524 \n",
       "L 841.449481 266.555319 \n",
       "L 859.413608 39.26175 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ff0000; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"mcbb4704db6\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #ff0000\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p9963261d30)\">\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"98.504517\" y=\"252.127508\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"118.393372\" y=\"136.59206\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"138.282227\" y=\"246.439684\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"156.88793\" y=\"341.66175\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"176.776784\" y=\"193.33287\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"196.024063\" y=\"99.337802\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"215.912918\" y=\"228.12708\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"235.160197\" y=\"229.79998\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"255.049052\" y=\"149.855952\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"274.937907\" y=\"184.546292\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"294.185185\" y=\"289.478378\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"314.07404\" y=\"235.793831\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"333.321319\" y=\"242.050674\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"353.210174\" y=\"289.714536\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"373.099029\" y=\"261.533237\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"391.063156\" y=\"247.833128\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"410.952011\" y=\"272.620903\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"430.199289\" y=\"220.842601\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"450.088144\" y=\"333.984668\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"469.335423\" y=\"270.758154\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"489.224278\" y=\"265.595053\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"509.113133\" y=\"232.618998\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"528.360412\" y=\"272.421861\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"548.249266\" y=\"335.323743\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"567.496545\" y=\"123.550098\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"587.3854\" y=\"212.636\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"607.274255\" y=\"274.297445\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"625.238382\" y=\"214.335665\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"645.127237\" y=\"321.481206\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"664.374516\" y=\"202.872399\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"684.26337\" y=\"217.50271\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"703.510649\" y=\"336.258779\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"723.399504\" y=\"252.099327\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"743.288359\" y=\"276.046521\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"762.535638\" y=\"157.319595\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"782.424493\" y=\"255.604325\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"801.671771\" y=\"235.349589\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"821.560626\" y=\"309.718524\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"841.449481\" y=\"266.555319\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     <use xlink:href=\"#mcbb4704db6\" x=\"859.413608\" y=\"39.26175\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 60.459063 356.78175 \n",
       "L 60.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 897.459062 356.78175 \n",
       "L 897.459062 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 60.459063 356.78175 \n",
       "L 897.459063 356.78175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 60.459063 24.14175 \n",
       "L 897.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_2\">\n",
       "   <g id=\"matplotlib.axis_3\">\n",
       "    <g id=\"ytick_9\">\n",
       "     <g id=\"line2d_26\">\n",
       "      <path d=\"M 60.459063 310.870862 \n",
       "L 897.459062 310.870862 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_27\">\n",
       "      <defs>\n",
       "       <path id=\"m024d26d04f\" d=\"M 0 0 \n",
       "L 3.5 0 \n",
       "\" style=\"stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m024d26d04f\" x=\"897.459062\" y=\"310.870862\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_14\">\n",
       "      <!-- −200 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(904.459062 314.670081) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"211.035156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_10\">\n",
       "     <g id=\"line2d_28\">\n",
       "      <path d=\"M 60.459063 257.386603 \n",
       "L 897.459062 257.386603 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_29\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m024d26d04f\" x=\"897.459062\" y=\"257.386603\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_15\">\n",
       "      <!-- −100 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(904.459062 261.185822) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"211.035156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_11\">\n",
       "     <g id=\"line2d_30\">\n",
       "      <path d=\"M 60.459063 203.902344 \n",
       "L 897.459062 203.902344 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_31\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m024d26d04f\" x=\"897.459062\" y=\"203.902344\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_16\">\n",
       "      <!-- 0 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(904.459062 207.701563) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_12\">\n",
       "     <g id=\"line2d_32\">\n",
       "      <path d=\"M 60.459063 150.418085 \n",
       "L 897.459062 150.418085 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_33\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m024d26d04f\" x=\"897.459062\" y=\"150.418085\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_17\">\n",
       "      <!-- 100 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(904.459062 154.217304) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_13\">\n",
       "     <g id=\"line2d_34\">\n",
       "      <path d=\"M 60.459063 96.933826 \n",
       "L 897.459062 96.933826 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_35\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m024d26d04f\" x=\"897.459062\" y=\"96.933826\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_18\">\n",
       "      <!-- 200 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(904.459062 100.733045) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_14\">\n",
       "     <g id=\"line2d_36\">\n",
       "      <path d=\"M 60.459063 43.449567 \n",
       "L 897.459062 43.449567 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #ffffff; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_37\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m024d26d04f\" x=\"897.459062\" y=\"43.449567\" style=\"fill: #555555; stroke: #555555; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_19\">\n",
       "      <!-- 300 -->\n",
       "      <g style=\"fill: #555555\" transform=\"translate(904.459062 47.248786) scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-33\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_20\">\n",
       "     <!-- change -->\n",
       "     <g style=\"fill: #0000ff\" transform=\"translate(945.044375 212.543625) rotate(-90) scale(0.12 -0.12)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-67\" d=\"M 2906 1791 \n",
       "Q 2906 2416 2648 2759 \n",
       "Q 2391 3103 1925 3103 \n",
       "Q 1463 3103 1205 2759 \n",
       "Q 947 2416 947 1791 \n",
       "Q 947 1169 1205 825 \n",
       "Q 1463 481 1925 481 \n",
       "Q 2391 481 2648 825 \n",
       "Q 2906 1169 2906 1791 \n",
       "z\n",
       "M 3481 434 \n",
       "Q 3481 -459 3084 -895 \n",
       "Q 2688 -1331 1869 -1331 \n",
       "Q 1566 -1331 1297 -1286 \n",
       "Q 1028 -1241 775 -1147 \n",
       "L 775 -588 \n",
       "Q 1028 -725 1275 -790 \n",
       "Q 1522 -856 1778 -856 \n",
       "Q 2344 -856 2625 -561 \n",
       "Q 2906 -266 2906 331 \n",
       "L 2906 616 \n",
       "Q 2728 306 2450 153 \n",
       "Q 2172 0 1784 0 \n",
       "Q 1141 0 747 490 \n",
       "Q 353 981 353 1791 \n",
       "Q 353 2603 747 3093 \n",
       "Q 1141 3584 1784 3584 \n",
       "Q 2172 3584 2450 3431 \n",
       "Q 2728 3278 2906 2969 \n",
       "L 2906 3500 \n",
       "L 3481 3500 \n",
       "L 3481 434 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-63\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"54.980469\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"118.359375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"179.638672\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-67\" x=\"243.017578\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"306.494141\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_38\">\n",
       "    <path d=\"M 118.393372 190.445705 \n",
       "L 138.282227 225.873678 \n",
       "L 156.88793 262.034385 \n",
       "L 176.776784 181.42291 \n",
       "L 196.024063 189.937604 \n",
       "L 215.912918 39.26175 \n",
       "L 235.160197 184.904735 \n",
       "L 255.049052 216.626249 \n",
       "L 274.937907 245.973062 \n",
       "L 294.185185 125.093289 \n",
       "L 314.07404 320.262698 \n",
       "L 333.321319 204.463929 \n",
       "L 353.210174 216.82949 \n",
       "L 373.099029 210.539741 \n",
       "L 391.063156 146.25701 \n",
       "L 410.952011 175.224085 \n",
       "L 430.199289 163.38267 \n",
       "L 450.088144 164.618156 \n",
       "L 469.335423 341.66175 \n",
       "L 489.224278 304.773657 \n",
       "L 509.113133 231.5751 \n",
       "L 528.360412 219.578581 \n",
       "L 548.249266 210.876692 \n",
       "L 567.496545 222.782288 \n",
       "L 587.3854 194.991867 \n",
       "L 607.274255 178.481276 \n",
       "L 625.238382 267.297236 \n",
       "L 645.127237 189.418807 \n",
       "L 664.374516 199.072716 \n",
       "L 684.26337 196.772893 \n",
       "L 703.510649 144.973388 \n",
       "L 723.399504 188.087049 \n",
       "L 743.288359 186.081389 \n",
       "L 762.535638 217.027381 \n",
       "L 782.424493 172.806596 \n",
       "L 801.671771 193.002252 \n",
       "L 821.560626 202.31921 \n",
       "L 841.449481 200.276112 \n",
       "L 859.413608 240.710211 \n",
       "\" clip-path=\"url(#p9963261d30)\" style=\"fill: none; stroke: #0000ff; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"mbf71db9e1a\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #0000ff\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p9963261d30)\">\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"118.393372\" y=\"190.445705\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"138.282227\" y=\"225.873678\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"156.88793\" y=\"262.034385\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"176.776784\" y=\"181.42291\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"196.024063\" y=\"189.937604\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"215.912918\" y=\"39.26175\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"235.160197\" y=\"184.904735\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"255.049052\" y=\"216.626249\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"274.937907\" y=\"245.973062\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"294.185185\" y=\"125.093289\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"314.07404\" y=\"320.262698\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"333.321319\" y=\"204.463929\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"353.210174\" y=\"216.82949\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"373.099029\" y=\"210.539741\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"391.063156\" y=\"146.25701\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"410.952011\" y=\"175.224085\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"430.199289\" y=\"163.38267\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"450.088144\" y=\"164.618156\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"469.335423\" y=\"341.66175\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"489.224278\" y=\"304.773657\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"509.113133\" y=\"231.5751\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"528.360412\" y=\"219.578581\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"548.249266\" y=\"210.876692\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"567.496545\" y=\"222.782288\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"587.3854\" y=\"194.991867\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"607.274255\" y=\"178.481276\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"625.238382\" y=\"267.297236\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"645.127237\" y=\"189.418807\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"664.374516\" y=\"199.072716\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"684.26337\" y=\"196.772893\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"703.510649\" y=\"144.973388\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"723.399504\" y=\"188.087049\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"743.288359\" y=\"186.081389\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"762.535638\" y=\"217.027381\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"782.424493\" y=\"172.806596\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"801.671771\" y=\"193.002252\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"821.560626\" y=\"202.31921\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"841.449481\" y=\"200.276112\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     <use xlink:href=\"#mbf71db9e1a\" x=\"859.413608\" y=\"240.710211\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_7\">\n",
       "    <path d=\"M 60.459063 356.78175 \n",
       "L 60.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_8\">\n",
       "    <path d=\"M 897.459062 356.78175 \n",
       "L 897.459062 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_9\">\n",
       "    <path d=\"M 60.459063 356.78175 \n",
       "L 897.459063 356.78175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_10\">\n",
       "    <path d=\"M 60.459063 24.14175 \n",
       "L 897.459063 24.14175 \n",
       "\" style=\"fill: none; stroke: #ffffff; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"text_21\">\n",
       "    <!-- China's Return and change -->\n",
       "    <g transform=\"translate(381.862563 18.14175) scale(0.144 -0.144)\">\n",
       "     <defs>\n",
       "      <path id=\"DejaVuSans-43\" d=\"M 4122 4306 \n",
       "L 4122 3641 \n",
       "Q 3803 3938 3442 4084 \n",
       "Q 3081 4231 2675 4231 \n",
       "Q 1875 4231 1450 3742 \n",
       "Q 1025 3253 1025 2328 \n",
       "Q 1025 1406 1450 917 \n",
       "Q 1875 428 2675 428 \n",
       "Q 3081 428 3442 575 \n",
       "Q 3803 722 4122 1019 \n",
       "L 4122 359 \n",
       "Q 3791 134 3420 21 \n",
       "Q 3050 -91 2638 -91 \n",
       "Q 1578 -91 968 557 \n",
       "Q 359 1206 359 2328 \n",
       "Q 359 3453 968 4101 \n",
       "Q 1578 4750 2638 4750 \n",
       "Q 3056 4750 3426 4639 \n",
       "Q 3797 4528 4122 4306 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
       "L 1178 3500 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 3500 \n",
       "z\n",
       "M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 4134 \n",
       "L 603 4134 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-27\" d=\"M 1147 4666 \n",
       "L 1147 2931 \n",
       "L 616 2931 \n",
       "L 616 4666 \n",
       "L 1147 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
       "L 2834 2853 \n",
       "Q 2591 2978 2328 3040 \n",
       "Q 2066 3103 1784 3103 \n",
       "Q 1356 3103 1142 2972 \n",
       "Q 928 2841 928 2578 \n",
       "Q 928 2378 1081 2264 \n",
       "Q 1234 2150 1697 2047 \n",
       "L 1894 2003 \n",
       "Q 2506 1872 2764 1633 \n",
       "Q 3022 1394 3022 966 \n",
       "Q 3022 478 2636 193 \n",
       "Q 2250 -91 1575 -91 \n",
       "Q 1294 -91 989 -36 \n",
       "Q 684 19 347 128 \n",
       "L 347 722 \n",
       "Q 666 556 975 473 \n",
       "Q 1284 391 1588 391 \n",
       "Q 1994 391 2212 530 \n",
       "Q 2431 669 2431 922 \n",
       "Q 2431 1156 2273 1281 \n",
       "Q 2116 1406 1581 1522 \n",
       "L 1381 1569 \n",
       "Q 847 1681 609 1914 \n",
       "Q 372 2147 372 2553 \n",
       "Q 372 3047 722 3315 \n",
       "Q 1072 3584 1716 3584 \n",
       "Q 2034 3584 2315 3537 \n",
       "Q 2597 3491 2834 3397 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "      <path id=\"DejaVuSans-64\" d=\"M 2906 2969 \n",
       "L 2906 4863 \n",
       "L 3481 4863 \n",
       "L 3481 0 \n",
       "L 2906 0 \n",
       "L 2906 525 \n",
       "Q 2725 213 2448 61 \n",
       "Q 2172 -91 1784 -91 \n",
       "Q 1150 -91 751 415 \n",
       "Q 353 922 353 1747 \n",
       "Q 353 2572 751 3078 \n",
       "Q 1150 3584 1784 3584 \n",
       "Q 2172 3584 2448 3432 \n",
       "Q 2725 3281 2906 2969 \n",
       "z\n",
       "M 947 1747 \n",
       "Q 947 1113 1208 752 \n",
       "Q 1469 391 1925 391 \n",
       "Q 2381 391 2643 752 \n",
       "Q 2906 1113 2906 1747 \n",
       "Q 2906 2381 2643 2742 \n",
       "Q 2381 3103 1925 3103 \n",
       "Q 1469 3103 1208 2742 \n",
       "Q 947 2381 947 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "     </defs>\n",
       "     <use xlink:href=\"#DejaVuSans-43\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-68\" x=\"69.824219\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-69\" x=\"133.203125\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"160.986328\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"224.365234\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-27\" x=\"285.644531\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-73\" x=\"313.134766\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"365.234375\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-52\" x=\"397.021484\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"462.003906\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-74\" x=\"523.527344\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-75\" x=\"562.736328\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-72\" x=\"626.115234\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"665.478516\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"728.857422\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"760.644531\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"821.923828\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-64\" x=\"885.302734\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-20\" x=\"948.779297\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-63\" x=\"980.566406\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-68\" x=\"1035.546875\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-61\" x=\"1098.925781\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-6e\" x=\"1160.205078\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-67\" x=\"1223.583984\"/>\n",
       "     <use xlink:href=\"#DejaVuSans-65\" x=\"1287.060547\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_11\">\n",
       "     <path d=\"M 821.655937 61.498 \n",
       "L 890.459062 61.498 \n",
       "Q 892.459062 61.498 892.459062 59.498 \n",
       "L 892.459062 31.14175 \n",
       "Q 892.459062 29.14175 890.459062 29.14175 \n",
       "L 821.655937 29.14175 \n",
       "Q 819.655937 29.14175 819.655937 31.14175 \n",
       "L 819.655937 59.498 \n",
       "Q 819.655937 61.498 821.655937 61.498 \n",
       "z\n",
       "\" style=\"fill: #e5e5e5; opacity: 0.8; stroke: #cccccc; stroke-width: 0.5; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"line2d_39\">\n",
       "     <path d=\"M 823.655937 37.240187 \n",
       "L 833.655937 37.240187 \n",
       "L 843.655937 37.240187 \n",
       "\" style=\"fill: none; stroke: #ff0000; stroke-linecap: square\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#mcbb4704db6\" x=\"833.655937\" y=\"37.240187\" style=\"fill: #ff0000; stroke: #ff0000\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_22\">\n",
       "     <!-- Return -->\n",
       "     <g transform=\"translate(851.655937 40.740187) scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-52\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"64.982422\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"126.505859\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-75\" x=\"165.714844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-72\" x=\"229.09375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"268.457031\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_40\">\n",
       "     <path d=\"M 823.655937 51.918312 \n",
       "L 833.655937 51.918312 \n",
       "L 843.655937 51.918312 \n",
       "\" style=\"fill: none; stroke: #0000ff; stroke-linecap: square\"/>\n",
       "     <g>\n",
       "      <use xlink:href=\"#mbf71db9e1a\" x=\"833.655937\" y=\"51.918312\" style=\"fill: #0000ff; stroke: #0000ff\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_23\">\n",
       "     <!-- change -->\n",
       "     <g transform=\"translate(851.655937 55.418312) scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-63\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"54.980469\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"118.359375\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6e\" x=\"179.638672\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-67\" x=\"243.017578\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"306.494141\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p9963261d30\">\n",
       "   <rect x=\"60.459063\" y=\"24.14175\" width=\"837\" height=\"332.64\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 1500x600 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax1=plt.subplots(figsize=(15,6))\n",
    "\n",
    "\n",
    "ax1.plot(reg_data['Raw_return'],\n",
    "         label='Return',\n",
    "         color='red',\n",
    "         linewidth=1,\n",
    "         linestyle='-',\n",
    "         marker='o')\n",
    "ax1.set_ylabel('Return',color='red')\n",
    "\n",
    "\n",
    "data_format=mdates.DateFormatter('%Y')\n",
    "ax1.xaxis.set_major_formatter(data_format)\n",
    "ax1.xaxis.set_major_locator(mdates.YearLocator())\n",
    "plt.xticks(rotation=90)\n",
    "\n",
    "\n",
    "ax2=ax1.twinx()\n",
    "ax2.plot(reg_data['change'].shift(1),\n",
    "         label='change',\n",
    "         color='blue',\n",
    "         linewidth=1,\n",
    "         linestyle='-',\n",
    "         marker='o')\n",
    "ax2.set_ylabel('change',color='blue')\n",
    "\n",
    "\n",
    "plt.title(\"China's Return and change\")\n",
    "\n",
    "\n",
    "lines,labels=ax1.get_legend_handles_labels()\n",
    "lines2,labels2=ax2.get_legend_handles_labels()\n",
    "ax2.legend(lines+lines2,labels+labels2,loc='upper right')\n",
    "\n",
    "\n",
    "plt.show();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 预测回归\n",
    "$$ R_t = a + β*X_{t-1} + ∈_t $$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 全样本Full-Sample"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 728,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:             Raw_return   R-squared:                       0.009\n",
      "Model:                            OLS   Adj. R-squared:                 -0.019\n",
      "Method:                 Least Squares   F-statistic:                    0.3150\n",
      "Date:                Tue, 26 Nov 2024   Prob (F-statistic):              0.578\n",
      "Time:                        17:16:01   Log-Likelihood:                 44.574\n",
      "No. Observations:                  38   AIC:                            -85.15\n",
      "Df Residuals:                      36   BIC:                            -81.87\n",
      "Df Model:                           1                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "Intercept    2.79e-05      0.012      0.002      0.998      -0.025       0.025\n",
      "lchange     7.219e-05      0.000      0.561      0.578      -0.000       0.000\n",
      "==============================================================================\n",
      "Omnibus:                        8.542   Durbin-Watson:                   1.868\n",
      "Prob(Omnibus):                  0.014   Jarque-Bera (JB):                7.341\n",
      "Skew:                           0.909   Prob(JB):                       0.0255\n",
      "Kurtosis:                       4.154   Cond. No.                         97.0\n",
      "==============================================================================\n",
      "\n",
      "Notes:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n"
     ]
    }
   ],
   "source": [
    "reg_data['lchange']=reg_data['change'].shift(2) #因为有滞后性 \n",
    "model_change=smf.ols('Raw_return ~ lchange',data=reg_data).fit()#smf.ols代表一型线性回归\n",
    "print(model_change.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 729,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Raw_return</th>\n",
       "      <th>Variance</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-11-30</th>\n",
       "      <td>-0.013393</td>\n",
       "      <td>0.000112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-12-31</th>\n",
       "      <td>0.120654</td>\n",
       "      <td>0.002712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006794</td>\n",
       "      <td>0.017973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.117274</td>\n",
       "      <td>0.011840</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "      <td>0.003087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "      <td>0.011776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014453</td>\n",
       "      <td>0.005451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012512</td>\n",
       "      <td>0.003471</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "      <td>0.003598</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "      <td>0.004050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.056729</td>\n",
       "      <td>0.007947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005557</td>\n",
       "      <td>0.005358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001702</td>\n",
       "      <td>0.001902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.057003</td>\n",
       "      <td>0.002222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024306</td>\n",
       "      <td>0.006156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008411</td>\n",
       "      <td>0.002826</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037170</td>\n",
       "      <td>0.003676</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022904</td>\n",
       "      <td>0.003170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.108366</td>\n",
       "      <td>0.006009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035009</td>\n",
       "      <td>0.013094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029019</td>\n",
       "      <td>0.006530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009241</td>\n",
       "      <td>0.004009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.036939</td>\n",
       "      <td>0.002820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.109920</td>\n",
       "      <td>0.004860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "      <td>0.009847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.032426</td>\n",
       "      <td>0.003367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039116</td>\n",
       "      <td>0.003293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.030454</td>\n",
       "      <td>0.001798</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.093860</td>\n",
       "      <td>0.002724</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "      <td>0.001867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026779</td>\n",
       "      <td>0.005357</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.111005</td>\n",
       "      <td>0.001843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013361</td>\n",
       "      <td>0.002083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.041145</td>\n",
       "      <td>0.002173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "      <td>0.004792</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017427</td>\n",
       "      <td>0.002458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006073</td>\n",
       "      <td>0.002519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.080212</td>\n",
       "      <td>0.002608</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030133</td>\n",
       "      <td>0.003476</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "      <td>0.029983</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>-0.040859</td>\n",
       "      <td>0.003731</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Raw_return  Variance\n",
       "Day                             \n",
       "2019-11-30   -0.013393  0.000112\n",
       "2019-12-31    0.120654  0.002712\n",
       "2020-01-31   -0.006794  0.017973\n",
       "2020-02-29   -0.117274  0.011840\n",
       "2020-03-31    0.054822  0.003087\n",
       "2020-04-30    0.163878  0.011776\n",
       "2020-05-31    0.014453  0.005451\n",
       "2020-06-30    0.012512  0.003471\n",
       "2020-07-31    0.105265  0.003598\n",
       "2020-08-31    0.065016  0.004050\n",
       "2020-09-30   -0.056729  0.007947\n",
       "2020-10-31    0.005557  0.005358\n",
       "2020-11-30   -0.001702  0.001902\n",
       "2020-12-31   -0.057003  0.002222\n",
       "2021-01-31   -0.024306  0.006156\n",
       "2021-02-28   -0.008411  0.002826\n",
       "2021-03-31   -0.037170  0.003676\n",
       "2021-04-30    0.022904  0.003170\n",
       "2021-05-31   -0.108366  0.006009\n",
       "2021-06-30   -0.035009  0.013094\n",
       "2021-07-31   -0.029019  0.006530\n",
       "2021-08-31    0.009241  0.004009\n",
       "2021-09-30   -0.036939  0.002820\n",
       "2021-10-31   -0.109920  0.004860\n",
       "2021-11-30    0.135786  0.009847\n",
       "2021-12-31    0.032426  0.003367\n",
       "2022-01-31   -0.039116  0.003293\n",
       "2022-02-28    0.030454  0.001798\n",
       "2022-03-31   -0.093860  0.002724\n",
       "2022-04-30    0.043754  0.001867\n",
       "2022-05-31    0.026779  0.005357\n",
       "2022-06-30   -0.111005  0.001843\n",
       "2022-07-31   -0.013361  0.002083\n",
       "2022-08-31   -0.041145  0.002173\n",
       "2022-09-30    0.096605  0.004792\n",
       "2022-10-31   -0.017427  0.002458\n",
       "2022-11-30    0.006073  0.002519\n",
       "2022-12-31   -0.080212  0.002608\n",
       "2023-01-31   -0.030133  0.003476\n",
       "2023-02-28    0.233580  0.029983\n",
       "2023-03-31   -0.040859  0.003731"
      ]
     },
     "execution_count": 729,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qreg_data=pd.merge(Month_data,monthly_var,left_index=True,right_index=True)\n",
    "qreg_data=qreg_data['2019':]\n",
    "qreg_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 730,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:             Raw_return   R-squared:                       0.034\n",
      "Model:                            OLS   Adj. R-squared:                  0.008\n",
      "Method:                 Least Squares   F-statistic:                     1.292\n",
      "Date:                Tue, 26 Nov 2024   Prob (F-statistic):              0.263\n",
      "Time:                        17:16:01   Log-Likelihood:                 46.605\n",
      "No. Observations:                  39   AIC:                            -89.21\n",
      "Df Residuals:                      37   BIC:                            -85.88\n",
      "Df Model:                           1                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "Intercept     -0.0189      0.020     -0.951      0.348      -0.059       0.021\n",
      "lVariance      3.7840      3.330      1.136      0.263      -2.962      10.530\n",
      "==============================================================================\n",
      "Omnibus:                       11.697   Durbin-Watson:                   2.267\n",
      "Prob(Omnibus):                  0.003   Jarque-Bera (JB):               11.638\n",
      "Skew:                           1.078   Prob(JB):                      0.00297\n",
      "Kurtosis:                       4.584   Cond. No.                         277.\n",
      "==============================================================================\n",
      "\n",
      "Notes:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n"
     ]
    }
   ],
   "source": [
    "qreg_data['lVariance']=qreg_data['Variance'].shift(2) #因为有滞后性 \n",
    "model_Variance=smf.ols('Raw_return ~ lVariance',data=qreg_data).fit()#smf.ols代表一型线性回归\n",
    "print(model_Variance.summary())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 子样本Sub-Sample"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 731,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Raw_return</th>\n",
       "      <th>change</th>\n",
       "      <th>lchange</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006794</td>\n",
       "      <td>-108.69</td>\n",
       "      <td>25.16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.117274</td>\n",
       "      <td>42.03</td>\n",
       "      <td>-41.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "      <td>26.11</td>\n",
       "      <td>-108.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "      <td>307.83</td>\n",
       "      <td>42.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014453</td>\n",
       "      <td>35.52</td>\n",
       "      <td>26.11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012512</td>\n",
       "      <td>-23.79</td>\n",
       "      <td>307.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "      <td>-78.66</td>\n",
       "      <td>35.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "      <td>147.35</td>\n",
       "      <td>-23.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.056729</td>\n",
       "      <td>-217.56</td>\n",
       "      <td>-78.66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005557</td>\n",
       "      <td>-1.05</td>\n",
       "      <td>147.35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001702</td>\n",
       "      <td>-24.17</td>\n",
       "      <td>-217.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.057003</td>\n",
       "      <td>-12.41</td>\n",
       "      <td>-1.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024306</td>\n",
       "      <td>107.78</td>\n",
       "      <td>-24.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008411</td>\n",
       "      <td>53.62</td>\n",
       "      <td>-12.41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037170</td>\n",
       "      <td>75.76</td>\n",
       "      <td>107.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022904</td>\n",
       "      <td>73.45</td>\n",
       "      <td>53.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.108366</td>\n",
       "      <td>-257.57</td>\n",
       "      <td>75.76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035009</td>\n",
       "      <td>-188.60</td>\n",
       "      <td>73.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029019</td>\n",
       "      <td>-51.74</td>\n",
       "      <td>-257.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009241</td>\n",
       "      <td>-29.31</td>\n",
       "      <td>-188.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.036939</td>\n",
       "      <td>-13.04</td>\n",
       "      <td>-51.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.109920</td>\n",
       "      <td>-35.30</td>\n",
       "      <td>-29.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "      <td>16.66</td>\n",
       "      <td>-13.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.032426</td>\n",
       "      <td>47.53</td>\n",
       "      <td>-35.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039116</td>\n",
       "      <td>-118.53</td>\n",
       "      <td>16.66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.030454</td>\n",
       "      <td>27.08</td>\n",
       "      <td>47.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.093860</td>\n",
       "      <td>9.03</td>\n",
       "      <td>-118.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "      <td>13.33</td>\n",
       "      <td>27.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026779</td>\n",
       "      <td>110.18</td>\n",
       "      <td>9.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.111005</td>\n",
       "      <td>29.57</td>\n",
       "      <td>13.33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013361</td>\n",
       "      <td>33.32</td>\n",
       "      <td>110.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.041145</td>\n",
       "      <td>-24.54</td>\n",
       "      <td>29.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "      <td>58.14</td>\n",
       "      <td>33.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017427</td>\n",
       "      <td>20.38</td>\n",
       "      <td>-24.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006073</td>\n",
       "      <td>2.96</td>\n",
       "      <td>58.14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.080212</td>\n",
       "      <td>6.78</td>\n",
       "      <td>20.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030133</td>\n",
       "      <td>-68.82</td>\n",
       "      <td>2.96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "      <td>83.91</td>\n",
       "      <td>6.78</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Raw_return  change  lchange\n",
       "Day                                    \n",
       "2020-01-31   -0.006794 -108.69    25.16\n",
       "2020-02-29   -0.117274   42.03   -41.08\n",
       "2020-03-31    0.054822   26.11  -108.69\n",
       "2020-04-30    0.163878  307.83    42.03\n",
       "2020-05-31    0.014453   35.52    26.11\n",
       "2020-06-30    0.012512  -23.79   307.83\n",
       "2020-07-31    0.105265  -78.66    35.52\n",
       "2020-08-31    0.065016  147.35   -23.79\n",
       "2020-09-30   -0.056729 -217.56   -78.66\n",
       "2020-10-31    0.005557   -1.05   147.35\n",
       "2020-11-30   -0.001702  -24.17  -217.56\n",
       "2020-12-31   -0.057003  -12.41    -1.05\n",
       "2021-01-31   -0.024306  107.78   -24.17\n",
       "2021-02-28   -0.008411   53.62   -12.41\n",
       "2021-03-31   -0.037170   75.76   107.78\n",
       "2021-04-30    0.022904   73.45    53.62\n",
       "2021-05-31   -0.108366 -257.57    75.76\n",
       "2021-06-30   -0.035009 -188.60    73.45\n",
       "2021-07-31   -0.029019  -51.74  -257.57\n",
       "2021-08-31    0.009241  -29.31  -188.60\n",
       "2021-09-30   -0.036939  -13.04   -51.74\n",
       "2021-10-31   -0.109920  -35.30   -29.31\n",
       "2021-11-30    0.135786   16.66   -13.04\n",
       "2021-12-31    0.032426   47.53   -35.30\n",
       "2022-01-31   -0.039116 -118.53    16.66\n",
       "2022-02-28    0.030454   27.08    47.53\n",
       "2022-03-31   -0.093860    9.03  -118.53\n",
       "2022-04-30    0.043754   13.33    27.08\n",
       "2022-05-31    0.026779  110.18     9.03\n",
       "2022-06-30   -0.111005   29.57    13.33\n",
       "2022-07-31   -0.013361   33.32   110.18\n",
       "2022-08-31   -0.041145  -24.54    29.57\n",
       "2022-09-30    0.096605   58.14    33.32\n",
       "2022-10-31   -0.017427   20.38   -24.54\n",
       "2022-11-30    0.006073    2.96    58.14\n",
       "2022-12-31   -0.080212    6.78    20.38\n",
       "2023-01-31   -0.030133  -68.82     2.96\n",
       "2023-02-28    0.233580   83.91     6.78"
      ]
     },
     "execution_count": 731,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lreg_data=pd.merge(Month_data,change,left_index=True,right_index=True)\n",
    "lreg_data=reg_data['2020':]\n",
    "lreg_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 732,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:             Raw_return   R-squared:                       0.006\n",
      "Model:                            OLS   Adj. R-squared:                 -0.023\n",
      "Method:                 Least Squares   F-statistic:                    0.2110\n",
      "Date:                Tue, 26 Nov 2024   Prob (F-statistic):              0.649\n",
      "Time:                        17:16:01   Log-Likelihood:                 42.445\n",
      "No. Observations:                  36   AIC:                            -80.89\n",
      "Df Residuals:                      34   BIC:                            -77.72\n",
      "Df Model:                           1                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "Intercept      0.0035      0.013      0.271      0.788      -0.022       0.029\n",
      "lchange     5.901e-05      0.000      0.459      0.649      -0.000       0.000\n",
      "==============================================================================\n",
      "Omnibus:                        8.650   Durbin-Watson:                   1.785\n",
      "Prob(Omnibus):                  0.013   Jarque-Bera (JB):                7.358\n",
      "Skew:                           0.943   Prob(JB):                       0.0252\n",
      "Kurtosis:                       4.161   Cond. No.                         99.4\n",
      "==============================================================================\n",
      "\n",
      "Notes:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\18762\\AppData\\Local\\Temp\\ipykernel_8548\\2362060142.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  lreg_data['lchange']=lreg_data['change'].shift(2) #因为有滞后性\n"
     ]
    }
   ],
   "source": [
    "lreg_data['lchange']=lreg_data['change'].shift(2) #因为有滞后性 \n",
    "lmodel_change=smf.ols('Raw_return ~ lchange',data=lreg_data).fit()#smf.ols代表一型线性回归\n",
    "print(lmodel_change.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 733,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Raw_return</th>\n",
       "      <th>Variance</th>\n",
       "      <th>lVariance</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Day</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-31</th>\n",
       "      <td>-0.006794</td>\n",
       "      <td>0.017973</td>\n",
       "      <td>0.000112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-29</th>\n",
       "      <td>-0.117274</td>\n",
       "      <td>0.011840</td>\n",
       "      <td>0.002712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>0.054822</td>\n",
       "      <td>0.003087</td>\n",
       "      <td>0.017973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>0.163878</td>\n",
       "      <td>0.011776</td>\n",
       "      <td>0.011840</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-31</th>\n",
       "      <td>0.014453</td>\n",
       "      <td>0.005451</td>\n",
       "      <td>0.003087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-06-30</th>\n",
       "      <td>0.012512</td>\n",
       "      <td>0.003471</td>\n",
       "      <td>0.011776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-07-31</th>\n",
       "      <td>0.105265</td>\n",
       "      <td>0.003598</td>\n",
       "      <td>0.005451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-08-31</th>\n",
       "      <td>0.065016</td>\n",
       "      <td>0.004050</td>\n",
       "      <td>0.003471</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>-0.056729</td>\n",
       "      <td>0.007947</td>\n",
       "      <td>0.003598</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>0.005557</td>\n",
       "      <td>0.005358</td>\n",
       "      <td>0.004050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>-0.001702</td>\n",
       "      <td>0.001902</td>\n",
       "      <td>0.007947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>-0.057003</td>\n",
       "      <td>0.002222</td>\n",
       "      <td>0.005358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>-0.024306</td>\n",
       "      <td>0.006156</td>\n",
       "      <td>0.001902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>-0.008411</td>\n",
       "      <td>0.002826</td>\n",
       "      <td>0.002222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>-0.037170</td>\n",
       "      <td>0.003676</td>\n",
       "      <td>0.006156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>0.022904</td>\n",
       "      <td>0.003170</td>\n",
       "      <td>0.002826</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>-0.108366</td>\n",
       "      <td>0.006009</td>\n",
       "      <td>0.003676</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>-0.035009</td>\n",
       "      <td>0.013094</td>\n",
       "      <td>0.003170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>-0.029019</td>\n",
       "      <td>0.006530</td>\n",
       "      <td>0.006009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>0.009241</td>\n",
       "      <td>0.004009</td>\n",
       "      <td>0.013094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>-0.036939</td>\n",
       "      <td>0.002820</td>\n",
       "      <td>0.006530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-31</th>\n",
       "      <td>-0.109920</td>\n",
       "      <td>0.004860</td>\n",
       "      <td>0.004009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-11-30</th>\n",
       "      <td>0.135786</td>\n",
       "      <td>0.009847</td>\n",
       "      <td>0.002820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-12-31</th>\n",
       "      <td>0.032426</td>\n",
       "      <td>0.003367</td>\n",
       "      <td>0.004860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-01-31</th>\n",
       "      <td>-0.039116</td>\n",
       "      <td>0.003293</td>\n",
       "      <td>0.009847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-02-28</th>\n",
       "      <td>0.030454</td>\n",
       "      <td>0.001798</td>\n",
       "      <td>0.003367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-03-31</th>\n",
       "      <td>-0.093860</td>\n",
       "      <td>0.002724</td>\n",
       "      <td>0.003293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-04-30</th>\n",
       "      <td>0.043754</td>\n",
       "      <td>0.001867</td>\n",
       "      <td>0.001798</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-05-31</th>\n",
       "      <td>0.026779</td>\n",
       "      <td>0.005357</td>\n",
       "      <td>0.002724</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-06-30</th>\n",
       "      <td>-0.111005</td>\n",
       "      <td>0.001843</td>\n",
       "      <td>0.001867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-07-31</th>\n",
       "      <td>-0.013361</td>\n",
       "      <td>0.002083</td>\n",
       "      <td>0.005357</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-08-31</th>\n",
       "      <td>-0.041145</td>\n",
       "      <td>0.002173</td>\n",
       "      <td>0.001843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-09-30</th>\n",
       "      <td>0.096605</td>\n",
       "      <td>0.004792</td>\n",
       "      <td>0.002083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-10-31</th>\n",
       "      <td>-0.017427</td>\n",
       "      <td>0.002458</td>\n",
       "      <td>0.002173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-11-30</th>\n",
       "      <td>0.006073</td>\n",
       "      <td>0.002519</td>\n",
       "      <td>0.004792</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2022-12-31</th>\n",
       "      <td>-0.080212</td>\n",
       "      <td>0.002608</td>\n",
       "      <td>0.002458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-01-31</th>\n",
       "      <td>-0.030133</td>\n",
       "      <td>0.003476</td>\n",
       "      <td>0.002519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-02-28</th>\n",
       "      <td>0.233580</td>\n",
       "      <td>0.029983</td>\n",
       "      <td>0.002608</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-03-31</th>\n",
       "      <td>-0.040859</td>\n",
       "      <td>0.003731</td>\n",
       "      <td>0.003476</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Raw_return  Variance  lVariance\n",
       "Day                                        \n",
       "2020-01-31   -0.006794  0.017973   0.000112\n",
       "2020-02-29   -0.117274  0.011840   0.002712\n",
       "2020-03-31    0.054822  0.003087   0.017973\n",
       "2020-04-30    0.163878  0.011776   0.011840\n",
       "2020-05-31    0.014453  0.005451   0.003087\n",
       "2020-06-30    0.012512  0.003471   0.011776\n",
       "2020-07-31    0.105265  0.003598   0.005451\n",
       "2020-08-31    0.065016  0.004050   0.003471\n",
       "2020-09-30   -0.056729  0.007947   0.003598\n",
       "2020-10-31    0.005557  0.005358   0.004050\n",
       "2020-11-30   -0.001702  0.001902   0.007947\n",
       "2020-12-31   -0.057003  0.002222   0.005358\n",
       "2021-01-31   -0.024306  0.006156   0.001902\n",
       "2021-02-28   -0.008411  0.002826   0.002222\n",
       "2021-03-31   -0.037170  0.003676   0.006156\n",
       "2021-04-30    0.022904  0.003170   0.002826\n",
       "2021-05-31   -0.108366  0.006009   0.003676\n",
       "2021-06-30   -0.035009  0.013094   0.003170\n",
       "2021-07-31   -0.029019  0.006530   0.006009\n",
       "2021-08-31    0.009241  0.004009   0.013094\n",
       "2021-09-30   -0.036939  0.002820   0.006530\n",
       "2021-10-31   -0.109920  0.004860   0.004009\n",
       "2021-11-30    0.135786  0.009847   0.002820\n",
       "2021-12-31    0.032426  0.003367   0.004860\n",
       "2022-01-31   -0.039116  0.003293   0.009847\n",
       "2022-02-28    0.030454  0.001798   0.003367\n",
       "2022-03-31   -0.093860  0.002724   0.003293\n",
       "2022-04-30    0.043754  0.001867   0.001798\n",
       "2022-05-31    0.026779  0.005357   0.002724\n",
       "2022-06-30   -0.111005  0.001843   0.001867\n",
       "2022-07-31   -0.013361  0.002083   0.005357\n",
       "2022-08-31   -0.041145  0.002173   0.001843\n",
       "2022-09-30    0.096605  0.004792   0.002083\n",
       "2022-10-31   -0.017427  0.002458   0.002173\n",
       "2022-11-30    0.006073  0.002519   0.004792\n",
       "2022-12-31   -0.080212  0.002608   0.002458\n",
       "2023-01-31   -0.030133  0.003476   0.002519\n",
       "2023-02-28    0.233580  0.029983   0.002608\n",
       "2023-03-31   -0.040859  0.003731   0.003476"
      ]
     },
     "execution_count": 733,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lqreg_data=pd.merge(Month_data,monthly_var,left_index=True,right_index=True)\n",
    "lqreg_data=qreg_data['2020':]\n",
    "lqreg_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 734,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:             Raw_return   R-squared:                       0.028\n",
      "Model:                            OLS   Adj. R-squared:                 -0.000\n",
      "Method:                 Least Squares   F-statistic:                    0.9950\n",
      "Date:                Tue, 26 Nov 2024   Prob (F-statistic):              0.325\n",
      "Time:                        17:16:01   Log-Likelihood:                 44.359\n",
      "No. Observations:                  37   AIC:                            -84.72\n",
      "Df Residuals:                      35   BIC:                            -81.50\n",
      "Df Model:                           1                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "Intercept     -0.0144      0.021     -0.690      0.494      -0.057       0.028\n",
      "lVariance      3.4036      3.412      0.998      0.325      -3.523      10.330\n",
      "==============================================================================\n",
      "Omnibus:                       11.785   Durbin-Watson:                   2.259\n",
      "Prob(Omnibus):                  0.003   Jarque-Bera (JB):               11.570\n",
      "Skew:                           1.119   Prob(JB):                      0.00307\n",
      "Kurtosis:                       4.580   Cond. No.                         277.\n",
      "==============================================================================\n",
      "\n",
      "Notes:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\18762\\AppData\\Local\\Temp\\ipykernel_8548\\4040848441.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  lqreg_data['lVariance']=lqreg_data['Variance'].shift(2) #因为有滞后性\n"
     ]
    }
   ],
   "source": [
    "lqreg_data['lVariance']=lqreg_data['Variance'].shift(2) #因为有滞后性 \n",
    "lmodel_Variance=smf.ols('Raw_return ~ lVariance',data=lqreg_data).fit()#smf.ols代表一型线性回归\n",
    "print(lmodel_Variance.summary())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 整理结果"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 分析与理论论述一致/不同的可能原因"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "不一致\n",
    "\n",
    "波动率具有聚集性、厚尾性以及长记忆性等多种特征，这些特性使得波动率难以准确预测，并且真实的波动率无法从金融市场中直接观测得到，需要依赖模型进行估计，这增加了预测的不确定性。\n",
    "\n",
    "金融市场受到多种外部因素的复杂影响，包括政策变化、经济环境、市场情绪等，这些因素难以预计且可能对波动率产生显著影响。\n",
    "\n",
    "预测模型可能无法完美捕捉市场的所有动态和变化，导致预测的波动率与实际波动率存在差异。\n",
    "\n",
    "股票市场实际价格经常偏离于理论价格，甚至会有极大的出入，这使得基于理论模型的涨幅预测难以准确。\n",
    "\n",
    "突发事件或市场变化可能导致股票价格的急剧波动，这些变化可能无法被预测模型所捕捉。\n",
    "\n",
    "投资者可能无法获取完整的市场信息或存在信息不对称的情况，这可能导致预测结果与实际结果存在差异\n",
    "\n",
    "投资者的心理预期、风险偏好和投资策略等因素也可能影响股票价格的涨跌，这些因素难以被量化并纳入预测模型。\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
